Woking Heron's Formula In Reverse

503 Views Asked by At

I'm writing a program to generate randomized Heron's Formula word problems. I need to figure out how to work the problem in reverse so that the answer will come out to an integer. As an example, if I was generating a division question generator I would first randomly generate a multiplication problem like $2\times 7 = x$, then reformat that as $\frac{x}{2} = 7$. So for Heron's formula, I need to know a formula I can use where if I know the answer and randomly generate parts of the formula within specific constraints that the formula will tell me the rest of the numbers that I can then use to plug into Heron's Formula and from that generate the word problem.