Here's a program i wrote to find the greatest common divisor of two numbers. I was required by the teacher to use for loops.
The output screen displayed "Enter two numbers:" and I entered 45 and 15 expecting an answer of 15 but I got "gcd is 225". Can someone please tell me what's wrong with the program?