added new task

This commit is contained in:
ada-dmitry
2023-11-16 12:03:31 +03:00
parent 10b256c812
commit 1bbd6527b8
9 changed files with 95 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
#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);
}