#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i,v,count;
clrscr();
printf("ENTER THE ELEMENT IN ARRAY:");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
printf("\nTHE ELEMENTS YOU WANT TO SEARCH:");
scanf("%d",&v);
for(i=0;i<10;i++)
{
if(a[i]==v)
{
printf("\nVALUE FOUNDAT CELL NO.%d=%d",i,v);
break;
}
}
getch();
}
#include<conio.h>
void main()
{
int a[10],i,v,count;
clrscr();
printf("ENTER THE ELEMENT IN ARRAY:");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
printf("\nTHE ELEMENTS YOU WANT TO SEARCH:");
scanf("%d",&v);
for(i=0;i<10;i++)
{
if(a[i]==v)
{
printf("\nVALUE FOUNDAT CELL NO.%d=%d",i,v);
break;
}
}
getch();
}
0 comments :
Post a Comment