请在 下方输入 要搜索的题目:

In the following programs, which one has the different output with the others’?


A、 k=1while (1) {
s+=k ;
k=k+1;
if (k>100) break ;}printf("%d",s);;
B、k=1;Repeat :
s+=k ;
if (++k<=100)


goto Repeat

printf("%d",s);;
C、int k,s=0;for (k=1;k<=100;s+=++k);printf("%d",s);;
D、k=1;do{
s+=k;}while (++k<=100);printf("%d",s);

发布时间:2025-06-19 01:14:55
推荐参考答案 ( 由 快搜搜题库 官方老师解答 )
联系客服
答案:int k,s=0;for (k=1;k<=100;s+=++k);printf("%d",s);
专业技术学习
专业技术学习
搜搜题库系统