#include<stdio.h> int reverse(int x); main() { int a; printf("input:"); scanf("%d", &a); printf("%d\n", reverse(a)); } int reverse(int x) { int m=0; while (x != 0) { m = m * 10 + x % 10; x= x/ 10; } return m; }