关于以下程序段,说法正确的是()int score,i=0,sum=0;loop: printf("Data: ");scanf("%d",&score);if(score!=-1){sum=sum+score;i++;goto loop;}
A. loop称为语句标号
B. score不等于-1时执行流程将形成循环
C. goto loop可以写为goto LOOP
D. loop在使用之前须进行定义
查看答案
goto命令是最常用的循环控制命令
A. 对
B. 错
以下程序段中的loop是一个语句标号if(score!=-1){sum=sum+score;i++;goto loop;}
A. 对
B. 错
goto命令常与if命令配合使用
A. 对
B. 错
以下程序段中的loop是一个语句标号,它所标识的语句只能在该程序段之后if(score!=-1){sum=sum+score;i++;goto loop;}
A. 对
B. 错