-->

Facebook

Jasper Roberts - Blog

Wednesday, October 15, 2014

Write a c program to reverse a given number.

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

void main()
{
int num, i;
clrscr();

printf(“Enter the number:”);




scanf(“%d”,&num);

printf(“the reverse number is: %d”,num);

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

OUTPUT:
Enter the number:123

the reverse number is: 321

Download
fibonacci series cpu(2110003) in pdf format

No comments:

Post a Comment