Код не работает так, как должен Укажите пожалуйста на мои ошибки
#include <stdio.h>
#include <math.h>
int func(int ch)
{
int result = 0;
while (ch != 0)
{
result = (result * 10) + (ch % 10);
ch = (ch - (ch % 10)) / 10;
}
return result;
}
int main()
{
int a = 7631;
func(a);
printf("%d", a);
return 0;
}
Свежие комментарии