#include<conio.h>
int main()
{
int n,i,a[20];
clrscr();
printf("Enter number of elements");
scanf("%d",&n);
printf("Enter array elements" );
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("\n displaying elements in reverse order");
for(i=n-1;i>=0;i--)
{
printf("\n %d", a[i]);
}
getch();
return 0;
}
0 comments:
Post a Comment