+ 3
How to make a c language program to reverse of a five digits number without use of loop?
please tell me .
5 Réponses
+ 2
recursion version:
https://code.sololearn.com/c4LELEpf2sSc/#c
+ 1
you can take the number into a string and use strrev()
+ 1
goto version:
https://code.sololearn.com/c6OS4Gfo80W2/#c
+ 1
long x,rev;
x=12345;
rev=(x/10000)%10+10*((x/1000)%10)+100*((x/100)%10)+1000*((x/10)%10)+10000*(x%10);
printf("%d",rev);
0
Use recursion