下述程序段中 与其他程序段的作用不同。
已帮助 人
下述程序段中, 与其他程序段的作用不同。
A.k=1; while (1) { s+=k ; k=k+1 ; if (k>100) break ; } printf(“n%d”,s) ;
B.k=1; Repeat : s+=k ; if (k<=100) goto Repeat printf(“n%d”,s) ;
C.int k,s=0; for (k=1;k<=100;s+=++k); printf(“n%d”,s) ;
D.k=1; do s+=k; while (k<=100) ; printf(“n%d”,s) ;

回答
共1条回复-
C
