-->

Facebook

Jasper Roberts - Blog

Monday, November 3, 2014

Write a c program to reverse a given integer number.

#include<conio.h>
#include<stdio.h>

void main()
{
int num,i;

clrscr();

printf("Enter the number:");
scanf("%d",&num);


printf("Reverse of %d is = ",num);

while(num != 0)
{
i = num%10;
printf("%d",i);
num = num/10;
}
getch();
}

No comments:

Post a Comment