写出下面PHP代码运行的输出结果___。$s=0; $i=0;while($i++<10) { $s+=$i;}echo $s;
举一反三
- 写出下面PHP代码运行的输出结果___。$s = 0; $a = 60;if($a >= 50) $s = 100 + $a;$s = 100;echo $s;
- 下面程序的运行结果为:int i=1,s=3;do{ s+=i++;if(s%7==0) continue;else ++i;}while(s<;15);printf(“%d”,i);
- 有如下程序段:s = 0For i = 1 To 10 s = s + iNext iPrint s与上述程序段输出结果相同的程序段为( )。 A: s = 0: i = 0 While i <= 10 i = i + 1 s = s + i Wend Print s B: s = 0: i = 1 While i < 10 i = i + 1 s = s + i Wend Print s C: s = 0: i = 1 Do s = s + i i = i + 1 Loop While i < 10 Print s D: s = 0: i = 1 Do s = s + i i = i + 1 Loop Until i > 10 Print s
- 下列程序是求1到100的累计和,其中哪个程序是不能完成功能的: A: int s=0,i=0; while(i<=100)s+=i++ B: int s=0,i=0; while(i++<=100)s+=i; C: int s=0,i=0; while(i<100)s+=++i; D: int s=0,i=0; while(++i<=100)s+=i;
- 下面程序段的运行结果为____:inti=0,a=0,s=1;do{a=a+s*i;s=-s;i++;}while(i<10);cout<