#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,a[100];
printf("\nENTER THE SIZE OF THE ARRAY\n");
scanf("%d",&n);
printf("ENTER THE ELEMENTS IN THE ARRAY\n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
if(a[i]==i)
printf("\n%d\t",a[i]);
}
getch();
}
No comments:
Post a Comment