while(n>0) { r=n%m; n=m; m=r; }
Quote:can any one tell me that how many times this loop execute?
int how_many_times(int n, int m) { int count = 0: while(n>0) { r=n%m; n=m; m=r; ++count; } return count; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)