Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int a,b;
  7. printf("podaj liczbe calkowita a: ");
  8. scanf("%d", &a);
  9. printf("Podaj liczbe calkowita b: ");
  10. scanf("%d", &b);
  11. printf("%d/%d \n",a,b);
  12.  
  13. while (a != b)
  14. {
  15. if ( a< b)
  16. b=b-a;
  17. else
  18. a=a-b;
  19. }
  20.  
  21. printf("Po skroceniu liczb %d /%d",a,b);
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement