Write a program that accepts an array of numbers and a
number, and return a string “Yes” if
the number is found in the array, “No” if the number is not
found in the array.
Answer Posted / surabhi
void main()
{
int num,i=0,f=0;
int n[]={20,30,40,50};
printf("\n enter no:");
scanf("%d",&num);
for(;i<4;)
{
if(num==n[i++])
{
printf("\n YES");
f=1;
break;
}
}
if(f==0)
printf("\n NO");
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Explain the differences between vb.net and c#, related to oops concepts?
Explain and brief about rapid application development tool?
What is the Advantage of vb.net over vb
What is the strong name in .net assembly?
Is vb.net a programming language?
Explain how can we remove handlers at run time?
What is code access security?
Explain internal keyword in .net framework?
what is common language specification?
Name some different types of control?
Explain code security?
How would you implement inheritance using vb.net?
Observations between vb.net and vc#.net?
What are the features present in vb 2005?
What is the difference between vb 6 and vb.net?