1
0
2
-1
第1题:
有如下程序,运行时输出的结果是 ______。 Option Base 1 Private Sub Command1_Click() Dim a(3,3) As Integer For m=1 To 3 For n=1 To 3 a(m-1,n-1)=m+n+1 Next n Next m For m=0 To 2 For n=0 To 2 Print a(n,m); Next n Print Next m End Sub
A.0 1 2 1 2 3 2 3 4
B.3 4 5 4 5 6 5 6 7
C.1 3 5 3 5 7 5 7 9
D.2 4 6 4 6 8 6 8 10
第2题:
A 0、1
B 1、0
C 1、2
D 2、0
第3题:
有如下程序:
#define N 2
#define M N+1
#define NUM 2*M+1
main()
{
int i;
for(i=1;i<=NUM;i++)printf("%d\n",i);
}
该程序中的for循环执行的次数是
A.5
B.6
C.7
D.8
第4题:
设m>n,用“<"或“>"填空:
(1)m-5____n-5;(2) m+4____n+4;
(3)6m____6n; (4)-1/3m____-1/3n
(1)m-5n-5; (2) m+4n+4;
(3)6m6n; (4)-1/3m-1/3n
第5题:
有如下程序: # define N 2 # define M N+1 # define NUM 2*M+1 # main() { int i; for(i=1; i<=NUM; i++) printf("% d\n", i); } 该程序中的for循环执行的次数是______。
A.5
B.6
C.7
D.8
第6题:
设有:
int a=1,b=2,c=3,d=4,m=2,n=2;
执行 (m=a>b)&&(n=c>d)后,n的值是
A.1
B.2
C.3
D.4
第7题:
下列程序中的for循环执行的次数是______。 #define N 2 #define M N+1 #define NUM 2*M+1 #main ( ) { int i; for (i=1;i<=NUM;i++) printf ("%d\n", i); }
A.5
B.6
C.7
D.8
第8题:
计算:
(1)(2x²y+3xy²)-(6x²y-3xy²);
(2)(5mn-2m+3n)+(-7m-7mn);
(3)(6a²-8a+11b³)-(11a²+2b³);
(4)(2ab+3b²-5)-(3ab+3b²-8)。
(1)原式=2x²y+3xy²-6x²y+3xy²= -4x²y+6xy²
(2)原式=5mn-2m+3n-7m-7mn=-2mn-9m+3n
(3)原式=6a²-8a+11b³-11a²-2b³= -5a²-8a+9b³
(4)原式=2ab+3b²-5-3ab-3b²+8=-ab+3
第9题:
有如下程序 #include<iostream.h> #define N2 #define M N+1 #define NUM 2*M+1 void main( ) { int i; for(i=1,i<= NUM;i++) cout<<i;} 该程序中的for循环执行的次数是
A.5
B.6
C.7
D.8
第10题:
设a、b、c、d、m、n均为int型变量,且a=5、b=6、c=7、d=8、m=2、n=2,则运算后,n的值为 ______。
A.0
B.1
C.2
D.3