j

Monday, 2 November 2015

Write a program that take 4 digit and print it into reverse order



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,a,b,c,d;
printf(“Enter 5-digit number:");
scanf(“%d”,&n)
a=n/10000;
n=n%10000;
b=n/1000;
n=n%1000;
c=n/100;
n=n%100;
d=n/10;
n=n%10;
printf("The inverse order is  %d%d%d%d%d”,n,s,c,b,a)";
getch();
}

Subscribe to this Blog via Email :