I'm a newbie taking a class working on this problem. Which I've got up until the last part.
I've got a form with 3 fields; all numbers. So, I type in 3 numbers and then the form is sent to a php page. Here's where my issue comes in; using a loop, I need to calculate the least comon denominator between the middle number and largest number.
I know how to get the largest number; $largestNum = (max($num1, $num2, $num3));
Where I'm stumped is how to get the middle number.
I think I know the logic but can't figure out how to implement it.
Here's what I think I need to do:
Create a While loop that finds the largest and smallest variables, and then use the one that is NOT them. Then make it a variable and multiply it times the max value ($largestNUm from above).
Am I on the right track?
Thanks!