Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n, i, a[100], b,c;
- cin>>n;
- for(i=0; i<n; i++
- cin>>a[i];
- b=a[0];
- for(i=1; i<n; i++)
- {
- b=a[i];
- while(a!=b)
- {
- if(a>b)
- a=a-b;
- else
- b=b-a;
- }
- a=b;
- }
- cout<<"cmmdc este: "<<a;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement