#include<stdio.h>
#include<string.h>
void main()
{
int a[10],n,I;
print("Enter element of array");
for(i=0;i<=9;i++)
scanf("%d",&a[i]);
printf("enter the number which you want to search");
scanf("% "%d" d",&n);
for(i=0;i<=9;i++)
{
if(a[i]==n)
break;
}
if(i==10)
print("element is not in the array");
else
printf("element present in array");
getch();
}
#include<string.h>
void main()
{
int a[10],n,I;
print("Enter element of array");
for(i=0;i<=9;i++)
scanf("%d",&a[i]);
printf("enter the number which you want to search");
scanf("% "%d" d",&n);
for(i=0;i<=9;i++)
{
if(a[i]==n)
break;
}
if(i==10)
print("element is not in the array");
else
printf("element present in array");
getch();
}
2 Comments
Very good bhai
ReplyDelete๐๐๐๐๐๐
ReplyDelete