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
Can you please explain the difference between system.string and system.stringbuilder classes?
i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate
What is the difference between static or dynamic assemblies?
Described strong typing and weak typing?
What is the importance of a Button control?
What is meant by jagged arrays?
What are the technology areas that microsoft.net contains?
Can you please explain the difference between int and int32?
How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently
What is portable executable?
Explain jagged array in vb.net?
What are the differences between c# and visual basic.net?
Explain about Visual basic.NET culture?
Explain the difference between import system.data.sqlclient and system.data.oledb?
Which classes a dll can contain?