Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- int a[10] = {0}, res[10] = {0};
- for (int i = 0; i < 10; ++i)
- scanf("%d", &a[i]);
- for (int i = 0; i < 10; ++i)
- res[i] = abs(a[i]/10 - a[i]%10);
- for (int i = 0; i < 10; ++i)
- printf("%2d ", res[i]);
- return 0;
- }
Add Comment
Please, Sign In to add comment