返回主页

[C语言 P1102] 下面程序的功能是在a数组中查找与x值相同的元素所在位置,请填空。

 
学习人数: 21.3k
 
正确率: ??%
答案解析

题目描述
未通过

下面程序的功能是在a数组中查找与x值相同的元素所在位置,请填空。

#include <stdio.h>

void  main()

{ int a[10],i,x;

printf(“input 10 integers:”);

for(i=0;i<10;i++)

scanf(“%d”,&a[i]);

printf(“input the number you want to find x:”); 

scanf(“%d”,      );

for(i=0;i<10;i++)

if(     )

break;

if(       )

printf(“the pos of x is:%d\n”,i);

else printf(“can not find x!\n”);

}


上一题
下一题
加入错题本
个人笔记
已有77条笔记

登录后提交答案


48 个回答 (点击展开回答)