#include
Int order (int * a, int n);
Int main ()
{
Int a [10], * p, b;
P=a;
Puts (" please enter the ten integer ");
for(int i=0; i<10; I++)
{
The scanf (" % d ", a + I);
}
Puts (" enter a number to find ");
The scanf (" % d ", b);
Order (p, b);
return 0;
}
Int order (int * a, int n)
{int b=0, I;
for(i=0; i<10; I++)
{
If (* (a + I)==n)
{b=1;
break;
}
}
If (b==0)
{
Printf (" no ");
}
The else
{
Printf (" % d ", * (a + I));
}
}
CodePudding user response:
The scanf (" % d ", b);Add & amp;
no.The scanf (" % d ", & amp; b);