UVA 11417 - GCD
Problem PDF
Solution:
#include
int gcd( int a, int b)
{
if(a%b==0)
return b;
else
return gcd(b,a%b);
}
int main()
{
int i,n,s,j;
while(scanf("%d",&n)==1)
{
if(n==0)
break;
else
{
s=0;
i=1;
for(i=1;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11417/11417.cpp