皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
有长度为10的一维整型数组a,由键盘输入它的值(10个不等的数),求a数组中最小元素的值 及其在数组中的位置。 输入样例: 16 9 56 23 24 75 6 81 36 35 输出样例: 最小元素是 6,是第7个元素 注意:a[0]是数组中的第1个元素。 请完善程序。( 有2个空,答案一行写一个,不要添加多余的空格 ) #include int main() { int i,a[10],min,k; // k存储位置 for(i=0;i<10;i++) scanf("%d",&a[i]); min=a[0]; // 假设第1个数为最 k=1; // k保存最的位置,此时为1 for(i=1;i<10;i++) { if(a[i] ) { min=a[i]; // min 更新为较 // k 更新为较的位置 } } printf(" 最小元素是 %d ,是第 %d 个元素 ",min,k); }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【多选题】采购管理系统主要包括哪些业务( )。
A.
采购
B.
代销
C.
业务
D.
加工
【简答题】已知变量a定义为“i nt a=5;”,要使ra成为a的引用,则ra应定义为(),要使rb指向a,则rb应定义为()
【单选题】( ) contrast, he got the lowest mark of the class in the recent examination.
A.
Off
B.
In
C.
On
D.
To
【单选题】_________contrast, he got the lowest mark of the class in the recent examination.
A.
of
B.
with
C.
In
D.
for
【多选题】采购管理系统主要包括哪些业务()。
A.
普通采购
B.
受托代销
C.
直运业务
D.
委托加工
【单选题】The reason why the blind man climbed the tower was that ________ .
A.
he liked the exercise and the fresh air at the top of the tower
B.
the view from the tower was fantastic
C.
he had got into the habit of coming up the tower every day
D.
he liked to feel the contrast between light and shade on his way up the tower
【简答题】已知变量a定义为“int a=5;”,要使ra成为a的引用,则ra应定义为___。
【简答题】____ contrast, he got the lowest mark of the class in the recent examination.
【单选题】He celebrated his 29th birthday, got married last week and signed a new multi-year ________ with Mercedes on Monday.
A.
contact
B.
content
C.
contract
D.
contrast
【单选题】________ contrast, he got the lowest mark of the class in the recent exam.
A.
By
B.
To
C.
For
D.
Into
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题