网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
以下是表单的Activate事件的代码: s=0 n=5 do while n>0 s=s+n n=n-1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()
A

0

B

10

C

15

D

20


参考答案

参考解析
解析: 暂无解析
更多 “单选题以下是表单的Activate事件的代码: s=0 n=5 do while n0 s=s+n n=n-1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A 0B 10C 15D 20” 相关考题
考题 有以下程序include stdio.hint fun(char s[]){ int n=0;while(*s='9'stdio.hint fun(char s[]){ int n=0;while(*s='9'*s='0') {n=10*n+*s-'0';s++;}return(n);}main(){ char s[10]={ '6', '1', '*', '4', '*', '9', '*', '0', '*'};printf("%d\n",fun(s));}程序运行的结果是A ) 9B ) 61490C ) 61D ) 5

考题 1+ + + +…….n 最大的n。请填空Private Sub Command1__Click()Dim s ,m,n AS Integerm=Val(InputBox(“请输入一个大于100的整数”))n=_______s=0Do While s N=n+1S=s+n*nLoopPrint “满足不等式的最大n是_______End Sub

考题 有以下程序#include stdio.hint fun(char s[]){ int n=0;while(*s=′9′*s=′0′) {n=10*n+*s-′0′;s++;}return(n);}main(){ char s[10]={′6′,′1′,′*′,′4′,′*′,′9′,′*′,′0′,′*′};printf("%d\n",fun(s));}程序的运行结果是A.9B.61490C.61D.5

考题 下列程序是死循环的是A.for(;;);B.int s=36; while(S)--S;C.int m=10; do { m- - }while(m0);D.int n=5; while(n1) { n- -; if(n0)break; }

考题 有以下程序main( ){ int s=0,a=1,n;scanf("%d",n);do{ s+=1; a=a-2; }while(a!=n);printf("%d\n",s);}若要使程序的输出值为2,则应该从键盘给n输入的值是A.-1B.-3C.-5D.0

考题 有如下程序: main() { int s=0, a=1,n; scanf("% d", n); do { s+=1; a=a-2;} while(a!=n) printf("% d\n", s); } 若要使程序输出2,则应该从键盘输入的值是______。A.-1B.-3C.-5D.0

考题 下列程序是死循环的是 ( )A.for(;;)B.int s=36; while(s)=s;C.int m=10; do{m- -;}while(m>0);D.int n=5; while(n>1) { n- -; if(n<0)break; }

考题 下面程序的功能是从键盘输入—个大于100的整数m,计算并输出满足不等式1+22+32+42+…+n2<m的最大的n。请填空。Private Sub Command1_Click()Dim s,m,n As Integerm=Val(InputBox("请输入一个大于100的整数"))n=【 】s=0Do While s<mn=n+1s=s+n*nLoopPrint "满足不等式的最大n是";【 】End Sub

考题 有以下程序includeintfun(chars[]){intn=0;while(*s='0'){n=10*n+* 有以下程序 #include <stdio.h> int fun(char s[]) { int n=0; while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;} return(n); } main() {char s[10]={'6','1','*','4','*','9','*','0','*'}; printf("%d\n",fun(s)); } 程序的运行结果是A.9B.61490C.61D.5

考题 下面程序的运行结果是( )。 include main() {int a,s,n,m; a=2;s=0;n=1;m=1; while(m 下面程序的运行结果是( )。 include<stdio.h> main() {int a,s,n,m; a=2;s=0;n=1;m=1; while(m<=4){n=n*a;s=s+n;++m;} printf("s=%d",s); }

考题 执行以下的循环后输出的值为( )。 public class Sun { public static void main(String args[ ]) { int m=1000,s=0,n=0; do{ n=n+1; s=s+(int)Math.pow(2,n); }while(s<=m); System.out.println("n="+n+","+"s="+s); } }A.n=9,s=1000B.n=8,s=1022C.n=9,s=1022D.n=8,s=1000

考题 下列程序的运行结果是 SET TALK OFF STORE 0 TO S N=20 DO WHILE N>S S=S+N N=N-2 ENDDO ?S RETURNA.0B.2C.20D.18

考题 有以下程序 main() { int s=0, a=1, n; scanf ( "%d", n); do { s+=l; a=a-2; } while (a! =n); print f ( "%d\n" , s ); 若要使程序的输出值为2,则应该从键盘给n输入不敷出值是A.-1B.-3C.-5D.0

考题 SETTALKOFF STORE 0 TO S N=20 DO WHILE N>S S=S+N N=N-2 ENDDO ?S RETURN 上列程序的运行结果是A.0B.2C.20D.18

考题 有以下程序 include int fun(char s[ ]) { int n=0; while(*s='0 有以下程序#include <stdio.h>int fun(char s[ ]){ int n=0;while(*s<='9'*s>='0') {n=10*n+*s-'0';s++;}retum(n);}main( ){ char s[10]={'6','1','*','4','*','9','*','0','*'};printf("%d\n",fun(s));}程序的运行结果是A.9B.61490C.61D.5

考题 算法的主要运算如下: While i<n do { s=0; While s<n do { s=s+1; } i=i+1; } 其中i的初值为0,s初值为0,“=”为赋值号。该算法的时间复杂度为()A.O(2n)B.O(n+log2n)C.O(nlog2n)D.O(n2)

考题 有以下程序:includemain(){int s=0,a=1,n; scanf("%d",n); do {s+=1;a=a-2;} whi 有以下程序: #include <stdio.h> main() { int s=0,a=1,n; scanf("%d",n); do {s+=1;a=a-2;} while(a!=n); printf("%d\n",s); } 若要使程序的输出值为2,则应该从键盘给n输入的值是( )。A.-1B.-3C.-5D.0

考题 有以下程序 includestdio.hintfun(chars[]){intn=0;while(*s=’9’stdio.hint fun(char s[]){int n=0;while(*s=’9’*s=’0’) { n=10*n+*s-‘0’;s++; }return(n);}main(){char s[10]={‘6’,’1’,’*’,’4’,’*’,’9’,’*’,’0’,’*’};printf(“%d\n”,fun(s));}程序的运行结果是( )。A.9B.61490C.61D.5

考题 程序段char*s=”aBcD”;n=0;while(*s!=’/0’){if(*s=’a’*s=’z’)n++;s++;}执行后n=()。

考题 以下是表单的Activate事件的代码: s=0 n=5 do while n0 s=s+n n=n-1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A、0B、10C、15D、20

考题 以下是表单的Activate事件的代码: s=1 n=1 do while n=4 s=s*n n=n+1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A、24B、10C、4D、1

考题 以下是表单的Activate事件的代码: s=0 for n=10 to 0 step -5 s=s+n endfor this.text1.value=s 这段代码执行后,文本框Text1的值为()A、-5B、0C、10D、15

考题 以下是表单的Activate事件的代码: s=0 for n=1 to 10 step 3 s=s+n endfor this.text1.value=s 这段代码执行后,文本框Text1的内容为()A、0B、3C、12D、22

考题 以下是表单的Activate事件的代码: s=0 n=0 do while n10 s=s+n   n=n+3 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A、18B、10C、3D、0

考题 单选题以下是表单的Activate事件的代码: s=0 for n=10 to 0 step -2 s=s+n endfor this.text1.value=s 这段代码执行后,文本框Text1的值为()A 30B 10C 0D -2

考题 单选题以下是表单的Activate事件的代码: s=0 n=5 do while n0 s=s+n n=n-1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A 0B 10C 15D 20

考题 单选题以下是表单的Activate事件的代码: s=1 n=1 do while n=4 s=s*n n=n+1 enddo this.label1.caption=str(s,2) 这段代码执行后,标签Label1的标题为()A 24B 10C 4D 1

考题 单选题有以下程序#include int fun(char s[]){ int n=0; while(*s='0') {  n=10*n+*s-'0';  s++; } return (n);}main(){ char s[10]={'6','1','*','4','*','9','*','0','*'}; printf("%d",fun(s));}程序的运行结果是(  )。A 61490B 61C 9D 5