Computer Science, asked by sura13, 1 year ago

write a c program to find revers of number using while loop​

Answers

Answered by Zisha7
4

Answer:

#include<stdio.h>

// www. instanceofjava.com all right reversed

int main()

{

int n, reversed_number=0,

rem original_number=0;

printf("Enter a number to get reversed number");

scanf("%d",&n);

original_number=n;

while(n!=0)

{

rem=n%10;

reversed_number=reversed number*10+ rem;

n/=10;

}

printf("Reversed Number of %d is = Original_ Number=0;, reverse_number);

getch();

}

Similar questions