Cod sursa(job #531316)

Utilizator hiticas_abelhiticasabel hiticas_abel Data 9 februarie 2011 13:54:17
Problema Algoritmul lui Euclid Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.27 kb
#include<iostream.h>
int main()
{
    int a,b,r,c;
    cout<<"a=";cin>>a;
    cout<<"b=";cin>>b;
    while(a%b!=0)
    {
                 r=a%b;
                 a=b;
                 b=r;
    }
    cout<<b;
    
    system("pause");
    
return 0;    

}