link for the problem :-FLOW016 Problem - CodeChef
my solution:-CodeChef: Practical coding for everyone
can someone tell me what is wrong with my code and how should i correct it
your code, ACfied.
while(n1%n2!=0){
n2=n1%n2;
}
this wasn’t updating values of n1 and n2 correctly, it’s better to use seperate function to ease the calculation of gcd.
ok