1#include <stdio.h>
2int main() {
3 int n, rev = 0, remainder;
4 printf("Enter an integer: ");
5 scanf("%d", &n);
6 while (n != 0) {
7 remainder = n % 10;
8 rev = rev * 10 + remainder;
9 n /= 10;
10 }
11 printf("Reversed number = %d", rev);
12 return 0;
13}
1#include <stdio.h>
2int main() {
3 int n, rev = 0, remainder;
4 printf("Enter an integer: ");
5 scanf("%d", &n);
6 while (n != 0) {
7 remainder = n % 10;
8 rev = rev * 10 + remainder;
9 n /= 10;
10 }
11 printf("Reversed number = %d", rev);
12 return 0;
13}
14
15
1#include <stdio.h>
2int main() {
3 int n, rev = 0, remainder;
4 printf("Enter an integer: ");
5 scanf("%d", &n);
6 while (n != 0) {
7 remainder = n % 10;
8 rev = rev * 10 + remainder;
9 n /= 10;
10 }
11 printf("Reversed number = %d", rev);
12 return 0;
13}
14
1#include<stdio.h>
2int main(){
3 int n=23450;
4 int rev_num = 0;
5 while(n!=0){
6 rev_num = rev_num * 10 + n%10;
7 n = n/10;
8 }
9 printf("%d", rev_num);
10}