单项选择题
下面程序的功能是将从键盘输入的两个数由小到大排序输出,当输入一对相等数时结束循环。请选择填空。
#include <stdio.h>
main()
int a,b,t;
scanf("%d%d",&a,&b);
while(______)
if(a>b) t=a;a=b;b=t;
printf("%d,%d\n",a,b);
scanf("%d%d",&a,&b);
A.! a=b
B.a! =b
C.a= =b
D.a=b
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
已知学生记录描述为: struct student int no; char name[20],sex; struct int year,month,day; birth; ; struct student s; 设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是( )。
A.year=1984;month=11;day=12;
B.year=1984;s.month=11;s.day=12;
C.birth.year=1984;birth.month=11;birth.day=12;
D.birth.year=1984;s.birth.month=11;s.birth.day=12;
点击查看答案&解析
填空题
长度为n的顺序存储线性表中,当在任何位置上插入一个元素概率都相等时,插入一个元素所需移动元素的平均个数为 【1】 。
点击查看答案
相关试题
以下程序的功能是:删去一维数组中所有相同...
以下程序的输出结果是 【18】 。 #in...
下面程序的功能是输出数组s中最大元素的下...
下面程序的运行结果是 【17】 。 #in...
下面函数要求计算两个整数x,y之和,并通过...