网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
阅读下列程序 INTEGER M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,10)(M(3,J),J=1,3) 10 FORMAT(1X,3I2) END 程序运行结果是()
A
2 5 8
B
3 6 9
C
4 5 6
D
7 8 9
参考答案
参考解析
解析:
暂无解析
更多 “单选题阅读下列程序 INTEGER M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,10)(M(3,J),J=1,3) 10 FORMAT(1X,3I2) END 程序运行结果是()A 2 5 8B 3 6 9C 4 5 6D 7 8 9” 相关考题
考题
有如下程序:Private Sub Command1_Click()Dim k As Integer, m As IntegerDim p As Integerk=4: m=1p=PC(k, m) : Print p;p=PC(k, m) : Print pEnd SubPrivate Function PC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPC=mEnd Function程序运行后,输出的结果为( )。A.4 6B.6 6C.8 8D.10 12
考题
单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click()Print Fun(23,18)End SubPublic Function Fun(m As Integer,n As Integer) As IntegerDO While m<>nDO While m>n:m=m-n:LoopDO While m<n:n=n-m:LoopLoopFun=mEnd FunctionA.0B.1C.3D.5
考题
下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6
考题
单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click() Print Fun(23,18) End Sub Public Function Fun(m As Integer,n As Integer)As Integer Do While m<>n Do While m>n:m=m-n:Loop Do While m<n:n=n-m:Loop Loop Fun=m End FunctionA.0B.1C.3D.5
考题
以下用户自定义函数 Function Func(a As Integer,b As Integer)As Integer Static m As Integer.i As Integer m=0:i=2 i=i+m+i m=i+a-i-b Func=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim k As Integer,m As Integer,p As Integer k=4:m=1 P=Func(k,m) Print P End Sub 程序运行后,单击命令按钮,输出结果为A.8B.9C.10D.11
考题
(27)下列函数过程 Function Func(a As Integer,b As Integer)As Integer Static m As Integer,i As Integer M=0 i=2 A=i+m+1 b=i+a+b Func2=m End Function Private Sub Command1_Click() Dim p As Integer,k As Integer,m As Integer k=4 m=1 P=Func2(k,m) Print k;m End Sub程序运行后,单击命令按钮,输出结果是 A.3 6CR3 6 B.3 6CR3 11C.3 11CR3 6 D.3 11CR3 11
考题
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i + m + 1 m=i + a + b PC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
考题
阅读以下说明和C++程序,将应填(n)处的字句写在对应栏内。[说明]设计一程序,输入10个整数到一个数组中,调整这10个数在数组中的位置,使得其中最小的一个数成为数组的首元素,最大的一个数成为数组的末元素。[C++程序]include <iostream.h>define SIZE 10void main ( ){int data [SIZE];int m;cout<<"请输入"<<SIZE<<"个整数:";for ( m=0;m<SIZE; m++ ) (1);int j=0,k=0;for ( int i=1;i<SIZE; i++ )if ((2)) j=i;else if ( data[i]<data[k] ) (3);if (j>0 ) {int d=data[0];(4);data[k]=d;}if ( k<SIZE-1 ){int d=data [SIZE- 1 ];data[SIZE- 1 ]=data[j];(5);}cout<<end1<<" 排序后: ";for ( m=0;m<SIZE; m++ ) cout<<data[m]<<" " ;}
考题
下面过程运行后,变量N的值为( )。 PRIVATE SUB MAINSUB( ) DIM N AS INTEGER N=9 CALL GET. DATA(N) END SUB PRIVATE SUB GETDATA(BYREF M AS INTEGER) M=M*3+SC-N(-9) END SUBA.25B.26C.27D.28
考题
阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写对应栏内。【说明】下面的程序实现了类String的构造函数、析构函数和赋值函数。已知类String的原型为:class String{public:String(coust char * str = NULL); //普通构造函数String( const String other); //拷贝构造函数~String(void); //析构函数String perate =(const String other); //赋值函数private:char * m_data; // 用于保存字符串};//String 的析构函数String:: ~String (void){(1);}//String 的普通构造函数String: :String( const char * str){if (2){m_data = new char[1];*m_data = '\0';}else{int length = strlen(str);m_data = new ehar[ length + 1 ];strepy(m_data, str);}}//拷贝的构造函数String:: String( const String other){ int length = strlen(other. m_data);m_data = new char[ length + 1 ];strepy(m_data, other, m_data); //赋值函数String String::operate = (eonst String other) //{if (3)return * this;delete [] m_clara; //释放原有的内存资源int length = strlen( other, m_data);m_data = new chart length + 1 ];(4);return (5);}
考题
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 p=PPC(k,m):Print op; p=PPC(k.m):Print op End Sub Private Function PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
考题
单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click( ) Print MyBM(23,18)End SubPublic Function MyBM(m As Integer,n As Integer)As Integer Do While m n Do While m > n:m=m - n:Loop Do While m < n:n=n - m:Loop Loop MyBM=mEnd FunctionA.0B.1C.3D.5
考题
有如下的程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim P As Integer k=4:m=1 P=Fun(k,m):Print P; P=Fun(k,m):Print P End Sub Private Function Fun(a As Integer,b As Integer) Static m As Integer,i As Integer in=5:i=2 i=i+m+1 m=i+a+b Fun=m\2 End Function 单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6 6
考题
有如下的程序。 Private Sub Commandl_Click( ) Dim k As Integer, m As Integer Dim P As Integer k=4: m=1 P=Fun(k, m) : Print P; P = Fun ( k, m) : Print P End Sub Private Function Fun( a As Integer, b As Integer) Static m As Integer, i As Integer m=5:i=2 i=i+m+1 m=i + a + b Fun=m\2 End Function 单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6
考题
单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub
考题
单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(m As Integer,n As Integer) As Integer Do While m<>n Do While m>n m=m-n Loop Do While m<n n=n -m Loop Loop MyFunc=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End SubA. 2B.4C.6D.8
考题
有如下的函数过程: Function Func2(a As Integer, b As Integer)'As Integer Static m As Integer, i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p As Integer, k As Integer, m As Integer k=4 m=1 p=Fune2(k, m) Print k; m p = Func2(k, m) Print k; m End Sub 程序运行后,单击命令按钮,输出结果为( )。A.3 6<CR>3 6B.3 6<CR>3 11C.3 11<CR>3 6D.3 11<CR>3 11
考题
有如下程序:Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 op:PPC(k,m):Print op; op:PPC(k,m):Print opEnd SubPrivate Function,PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=mEnd Function程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
考题
单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click Dim x As Integer, y As Integer x=12:y=32 Call Proc(x,y. Print x; y End Sub Public Sub Proc(n As Integer, ByVal m As Integer. n=n Mod 10 m=m Mod 10 End SubA.1232B.232C.23D.123
考题
下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print xA.3B.4C.5D.6
考题
阅读下列FORTRAN77程序:
INTEGER A(4,5)
DATA A/5*1,5*2,5*3,5*4/
M=0 DO 10 K=1,4
10 M=M+A(K,K+1)
WRITE(*,*)M
END
上述程序运行后,输出的M值为( )。A.8
B.9
C.10
D.11
考题
阅读以下FORTRAN程序
READ(*,*)M,N
K=MOD(M,N)
10 IF(K.GT.0)THEN
M=N
N=K
K=MOD(M,N)
GOTO 10
END IF
WRITE(*,*)N
END
若运行以上程序时,由键盘输入25,11,则程序输出为( )。A.3
B.2
C.1
D.0
考题
阅读下列FORTRAN77程序:
INTEGER A(3,3)
DATA A/1,2,3,4,5,6,7,8,9/
S=0.0
DO 10 I=1,3
J=MOD(I,3)+1
S=S+A(I,J)
10 CONTINUE
WRITE(*,*)S
END
上述程序运行后,输出的S值为( )。A.150
B.120
C.180
D.240
考题
填空题下列程序的运行结果是()。 Program main implicit none integer, target :: a=1 integer, pointer :: p p=a p=3 write(*,*)a end
考题
单选题阅读下列程序 DIMENSION M(3,3) DATA M/1,2,3,4,5,6,7,8,9/ WRITE(*,100)(M(3,J),J=1,3) 100 FORMAT(1X,3I2) END 程序运行结果是()A
2 5 8B
3 6 9C
4 5 6D
7 8 9
考题
单选题阅读下列程序 INTEGER F F(X,Y)=X+Y A=-2.5 B=2.1 B=B+F(A,B) WRITE(*,’(F3.1)’)B END 程序运行的结果是()A
1B
7C
2.1D
1.7
考题
单选题阅读下列程序 N=0 DO 10 K=1,3 N =N+1 M=K*N 10 CONTINUE WRITE(*,’(1X,2I3)’)M,K END 程序运行结果是()A
9 4B
9 3C
12 4D
12 3(#^)
热门标签
最新试卷