Program : Write a program in c to reverse the digits of a given integer.
Created By : JABIR PATHAN
#include<stdio.h>
#include<conio.h>
void main()
{
int no,rem=0,cnt=0;
clrscr();
printf("Enter any Number==>");
scanf("%d",&no);
printf("The Reverse number is=");
while(no!=0)
{
rem=no%10;
cnt++;
printf("%d",rem);
no=no/10;
}
printf("\nTotal digit in given integer=%d",cnt);
getch();
}
Created By : JABIR PATHAN
#include<stdio.h>
#include<conio.h>
void main()
{
int no,rem=0,cnt=0;
clrscr();
printf("Enter any Number==>");
scanf("%d",&no);
printf("The Reverse number is=");
while(no!=0)
{
rem=no%10;
cnt++;
printf("%d",rem);
no=no/10;
}
printf("\nTotal digit in given integer=%d",cnt);
getch();
}
No comments:
Post a Comment