#include <stdio.h> void fun(int a) { if (a == 0) { return; } fun(a / 10); printf("%d",a % 10); } int main() { int a = 12345; fun(a); }