mirror of
https://github.com/ada-dmitry/TMP_C712.git
synced 2026-09-24 09:10:16 +00:00
added new task
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user