Why does this code give me an answer of 25?
public int findGcd() {
int num = this.num;
int den = this.den;
while (den != 0) {
int t = den;
den = num % den;
num = t;
}
return num;
}
This is the main method:
public class FractionTest {
public static void main(String args[]) {
Fraction f = new Fraction();
f.num = 25;
f.den = 100;
f.findGcd();
}
}
Can anyone provide me a complete process of how all the program goes or run?