Misha_

Задача 4

Oct 8th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5.     int a[10] = {0}, res[10] = {0};
  6.     for (int i = 0; i < 10; ++i)
  7.         scanf("%d", &a[i]);
  8.     for (int i = 0; i < 10; ++i)
  9.         res[i] = abs(a[i]/10 - a[i]%10);
  10.     for (int i = 0; i < 10; ++i)
  11.         printf("%2d ", res[i]);
  12.     return 0;
  13. }
Add Comment
Please, Sign In to add comment