gashink_t

НОД

Feb 11th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5.     int a, b;
  6.     printf("vvedite chisla: \n");
  7.     scanf("%d %d", &a, &b);
  8.     while (a!=b) {
  9.         if (a>b) a=a-b;
  10.         else b=b-a;
  11.     }
  12.     printf("nod=%d ",a);
  13.     return 0;
  14. }
Add Comment
Please, Sign In to add comment