#include<stdio.h>
#include<conio.h>
void main()
{
int ar[10],i,n,s=0,c=0,avg;
clrscr();
printf("enter the limit\n");
scanf("%d",&n);
printf("enter the elements\n");
for(i=0;i<n;i++)
{
scanf("%d",&ar[i]);
}
i--;
printf("reverse of array is\n");
for(;i>=0;i--)
printf("%d\n",ar[i]);
getch();
}
#include<conio.h>
void main()
{
int ar[10],i,n,s=0,c=0,avg;
clrscr();
printf("enter the limit\n");
scanf("%d",&n);
printf("enter the elements\n");
for(i=0;i<n;i++)
{
scanf("%d",&ar[i]);
}
i--;
printf("reverse of array is\n");
for(;i>=0;i--)
printf("%d\n",ar[i]);
getch();
}
No comments:
Post a Comment