Created
July 17, 2017 17:40
-
-
Save ThePratikSah/b9811928888a417c6df61a31716f1bbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() { | |
int num, digit, rev_num=0; | |
printf("Enter any number:\n"); | |
scanf("%d", &num); | |
while(num!=0) { | |
digit=num % 10; | |
rev_num=(rev_num*10)+digit; | |
num=num/10; | |
} | |
printf("%d", rev_num); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment