/*C Program to Enter 5 Number at a time & Display them in Reverse Order of the input*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i, x[5];
clrscr();
for (i=0;i<5;i++)
{
printf("Enter the number\n");
scanf("%d",&x[i]);
}
printf("\nThe reverse order is\n");
for (i=4;i>=0;i--)
{
printf("\n%d",x[i]);
}
getch();
}
Hope you liked my posts, give comments if you have any doubts.. :)#include<stdio.h>
#include<conio.h>
void main()
{
int i, x[5];
clrscr();
for (i=0;i<5;i++)
{
printf("Enter the number\n");
scanf("%d",&x[i]);
}
printf("\nThe reverse order is\n");
for (i=4;i>=0;i--)
{
printf("\n%d",x[i]);
}
getch();
}
1 comments:
So funny and use full for c programmer to expert.
Post a Comment