面程序的功能是找出能够被13、23、43除余数分别为1、2、3的最小的两位正整数。
请填空。
Private Sub Form_Click()
Dim i As Integer,j As Integer
j=0
j=43+3
Do
j=j+1
if ______ then
print j
i=i+1
end if
Loop ________
End Sub
第1题:
下面程序的功能是:从输入的正整数中选3个数进行输出,要求这些数都是2的倍数,请填空。
第2题:
找出被3、5、7除,余数均为1的最小的5个正整数。 Private Sub Command1_Click() Dim countn%, n% n =1: countn = 0 Do n= n + 1 If Then Print n countn = countn + 1 End If Loop until count n=5 End Sub
A.n mod 3=1 And n mod 5=1 And n mod 7=1
B.n mod 3=1 or n mod 5=1 or n mod 7=1
C.n 3=1 And n 5=1 And n 7=1
D.n 3=1 or n 5=1 or n 7=1
第3题:
【填空题】下面程序的功能是在三个字符串中找出最小的。请分析程序填空。 #include <stdio.h> #include <string.h> main() {char s[20],str[3][20]; int i; for(i=0;i<3;i++) gets(str[i]); strcpy(s,【1】); if(strcmp(str[2],s)<0) strcpy(s,str[2]); printf("%sn",【2】); }
第4题:
(7)在窗体上画1个名称为Command 1的命令按钮,然后编写如下程序:
Private Sub Command 1 Click()
Dim m As Integer, x As Integer
Dim flag As Boolean
flag=False
n=Val(InputBox("请输入任意1个正整数"))
Do While Not flag
a=2
flag=【7】
Do While flag And a <= Int(Sqr(n))
If n/a=n\a Then
flag=False
Else
【8】
End If
Loop
If Not flag Then n=n+l
Loop
Print【9】
End Sub
上述程序的功能是,当在键盘输入任意的1个正整数时,将输出不小于该整数的最小素数。请填空完善程序。
第5题:
2、满足条件“ 除以3余数为1;除以4余数为2; 除以5余数为3; 除以6余数为4”的最小正整数是多少?
A.58
B.64
C.76
D.52