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

题目内容 (请给出正确答案)

现有以下程序: Private Sub Command1 Click( ) c1=0 c2=0 For i=1 To 100 If i Mod 3=0 Then c1=c1+1 Else If i Mod 7=0 Then c2=c2+1 End If Next i Print c1+c2 End Sub 此程序运行后输出的是在1~100范围内( )。

A.同时能被3和7整除的整数个数

B.能被3或7整除的整数个数(同时被3和7整除的数只记一次)

C.能被3整除,而不能被7整除的整数个数

D.能被7整除,而不能被3整除的整数个数


参考答案

更多 “ 现有以下程序: Private Sub Command1 Click( ) c1=0 c2=0 For i=1 To 100 If i Mod 3=0 Then c1=c1+1 Else If i Mod 7=0 Then c2=c2+1 End If Next i Print c1+c2 End Sub 此程序运行后输出的是在1~100范围内( )。A.同时能被3和7整除的整数个数B.能被3或7整除的整数个数(同时被3和7整除的数只记一次)C.能被3整除,而不能被7整除的整数个数D.能被7整除,而不能被3整除的整数个数 ” 相关考题
考题 有以下程序: void swapl(int c0[],int c1[]) {int t; t=c0[0];c0[0]=c1[0];c1[0]=t; } void swap2(int*c0,int*c1) {int t; t=*c0;*c0=*c1;*c1=t; } main() {int a[2]={3,5),b[2]={3,5}; swapl(a,a+1);swap2(&b[0],&b[1]); printf("%d%d%d%d\n",a[0],a[1],b[0],b[1]); } 程序运行后的输出结果是( )。A.3 5 5 3B.5 3 3 5C.3 5 3 5D.5 3 5 3

考题 有以下程序: void swapl(int c0[],int c1[]) {int t; t=c0[0]; c0[0]=c1[0];c1[0]=t; } void swap2(int *c0,iht *c1) {int t; t=*c0; *c0=*c1; *c1=t; } main() {int a[2]={3,5},b[2]={3,5}; swapl(a,a+1); swap2(b[0],b[1]); printf("%d%d%d%d\n",a[0]a[1],b[0],b[1]); } 程序运行后的输出结果是 ______。A.3 5 5 3B.5 3 3 5C.3 5 3 5D.5 3 5 3

考题 【程序说明】 计算1~30之间能够被3整除的奇数的阶乘和。【程序】** 主程序SET TALK OFFS=0FOR I=1 TO 30 STEP 2IF (4)(5)S=S+NENDIFENDFOR?“1到30之间能被3整除的奇数阶乘和为:”+ (6)SET TALK ONRETURN** 过程 P1.PRGPARAMETERS M(7)N=1FOR J=1 TO MN=N*JENDFOR(8)(4)A.MOD(I,3)=0B.MOD(I,3)>0C.MOD(I,3)<>0D.MOD(I,3)=0

考题 以下程序运行后的输出结果是______。 main() { char c1,c2; for(c1='0',c2='9';c1<c2;c1++,c2--) printf("%c%c",c1,c2); printf("\n"); }A.918245765B.893478654C.786584763D.918273645

考题 有以下程序: include void swap1 (int c0[],int e1[] ){intt;t = c0[0]; c0[0]: c1 [ 有以下程序: #include <stdio, h>void swap1 (int c0[],int e1[] ){ int t; t = c0[0]; c0[0]: c1 [0] ; c1 [0] = t;}void swap2(int * c0,int * c1){ int t; t= *c0; *c0= *c1; * c1 =t;}main( ){ inta[2]={3.5}.b[2]={3,5}; swapl(a,a+1) ;swap2(b[0],b[1]); printf("% d %a %d %d \n" ,a[0] ,a[1] ,b[0] ,b[1] ); }程序运行后的车出结果是( )。A.3 5 5 3B.5 3 3 5C.3 5 3 5D.5 3 5 3

考题 若有以下程序段: int c1=1,c2=2,c3: c3=c1/c2:A.0B.1/2C.0.5D.1

考题 以下程序段的输出结果是【 】。int x, i ;for (i=1; i<=100; i++){ x=i;if (++x%2==0)if (++x%3==0)if(++x%7==0) cout<<i<<' , ';}

考题 程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End SubA.32B.28C.30D.36

考题 有以下程序 void swapl(int c0[],int c1[] { int t; t=c0[0]; c0[0]=c1[0]; c1[0]=t; } void swap2 (int *c0,int *c1) { int t; t-*c0; *c0=*c1; *c1=t; } main() { int a[2]={3,5}, b[2]={3,5} swapl(a,a+1); swap2(b[0],b[1]); printf("%d %d %d %d\n",a[0],a[1],b[0],b[1]); } 程序运行后的输出结果是A.3 5 5 3B.5 3 3 5C.3 5 3 5D.5 3 5 3

考题 以下能够正确计算1+2+3+…+10的程序是A.Private sub Command1_Click( ) sum=0 For 1=1 To 10 Sum=sum+1, Next I Print Sum End SubB.Private sub Command1_Click( ) Sum=0,I=1 Do While l<=10 Sum=Sum+1 I=I+1 Print Sum End SubC.Private Sub command1_click( ) Sum=0:I=1 Do Sum=Sum+1 I=I+1 Loop While I<10 Print Sum End SubD.Private Sub command1_Click( ) Sum=0:I=1 Do Sum=Sum+1 l=I+1 Loop Until I<10 Print Sum End Sub