0
In sololearn I have to scan the 2 different integers ...but I can't..then what will be the proper way?
4 Respostas
0
How you tried? Can we see it ?
0
In this code,1st I scanned an array..it's scanning and printing properly..but next time I have to scan a number only...but num is not scanning properly..is there any mistake..while scanning?
0
What do you mean by scanning?
Searching?
Do you want to display 2nd entered number is in array or not?
Vaishnavi Pawar if yes, try this way..
In your program, just entering 7 number into array and in next loop displaying those numbers...
And to search the input taken value num is in array or not, use if block in loop like this...
bool b=false; //take int b=0;
for(int i=0;i<7;i++)
{
if(a[i] ==num){
b=true; //or b=1
break;
}
if(b)
printf("%d Number is in array" num);
else
printf("%d not in array", num);