Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- int main()
- { int n = 0;
- int m = 0;
- printf("Program do liczenia NWD\n");
- printf("Podaj pierwszą liczbę: ");
- scanf("%d",& n);
- printf("Podaj drugą liczbę: ");
- scanf("%d",& m);
- do{ if(n>m){
- n=n-m;
- }else{
- m=m-n
- }
- }while(n!=m);
- printf("NWD to: %d", n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement