mirror of
https://github.com/ada-dmitry/TMP_C712.git
synced 2026-09-24 01:00:19 +00:00
16 lines
306 B
C
16 lines
306 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
#define N 6
|
|
|
|
void print_revers(int x)
|
|
{
|
|
int res = 0;
|
|
for (int i = N - 1; i > -1; i--)
|
|
{
|
|
res += (x / (int)pow(10, i)) * (int)pow(10, (N - 1 - i));
|
|
x = x % (int)pow(10, i);
|
|
printf("%d | %d\n", x, res);
|
|
}
|
|
|
|
printf("%d\n", res);
|
|
} |