Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main ()
- {
- int a,b,t,nzd,i;
- scanf("%d%d",&a,&b);
- if (a<b)
- {
- t=b;
- }
- else
- {
- t=a;
- }
- for(i=t;i>=1;i--)
- {
- if (a%i==0 && b%i==0)
- {
- nzd=i;
- break;
- }
- }
- printf(" nzd = %d ",nzd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment