1: #include <stdio.h>
2: int main()
3: {
4: int n, reverse = 0;
5: printf("Enter a number to reverse\n");
6: scanf("%d", &n);
7: while (n != 0)
8: {
9: reverse = reverse * 10;
10: reverse = reverse + n%10;
11: n = n/10;
12: }
13: printf("Reverse of entered number is = %d\n", reverse);
14: return 0;
15: }
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Monday, 13 July 2015
Write C Program to Print Reverse Number of Input Numbers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment