Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- printf("Program znajdzie NWD doch podanych liczb\n");
- int m,n,r;
- printf("podaj m i n\n");
- scanf("%d %d",&m, &n);
- if(m%n!=0)
- {
- while(m%n!=0)
- {
- r=m%n;
- if(r!=0)
- {
- m=n;
- n=r;
- }
- }
- printf("%d",r);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement