注意:此页面搜索的是所有试题
题目内容
(中北大学-C语言程序设计)
在数组a中查找用户输入的某个数x。
#define N 10
main()
{
int a[N] = {23,56,11,87,91,35,41,44,60,6};
int p,x;
printf ( "\nPlease Enter find number:" );
;
p = 0;
while ( )
p ++ ; /* 不断查找的过程 */
if ( ) printf ( "%d Position is %d\n", x, p );
else printf ( "%d could not be found\n", x );
}
#define N 10
main()
{
int a[N] = {23,56,11,87,91,35,41,44,60,6};
int p,x;
printf ( "\nPlease Enter find number:" );
;
p = 0;
while ( )
p ++ ; /* 不断查找的过程 */
if ( ) printf ( "%d Position is %d\n", x, p );
else printf ( "%d could not be found\n", x );
}
参考答案