Computer Science, asked by karan4585, 11 months ago

write a program which enters a seven digit number and reversing the digit and prints the output​

Answers

Answered by KartikiMahajan
1

Answer:

sorry I will tell it later

Answered by hotelcalifornia
3

Answer:

The following program outputs the number obtained by reversing the entered seven digit number which is given by the user.

Explanation:

#include <stdio.h>

void main()

{

int n, reverse_num = 0;

printf("Enter a number to reverse\n");

scanf("%d", &n);

while (n != 0)

{

     reverse_num = reverse_num * 10;

     reverse_num = reverse_num + n%10;

     n       = n/10;

}

printf ("The number after reversing it is %d\n", reverse);

return;

}

Similar questions