更多"下面程序的运行结果是 (14) 。程序的功能是 (15)
。 Pu"的相关试题:
[填空题]下面程序的运行结果是 (14) 。程序的功能是 (15) 。
Public Function myfun(m,n)
Do while m>n
Do while m>n:m=m-n:Loop
Do While n>m:n=n-m:Loop
Loop
Myfun=m
End Function
Private Sub Command1_Click( )
Print myfun(15,15)
End Sub
[填空题]
下面程序的运行结果是 (14) 。程序的功能是 (15)
。
Public Function myfun(m,n)
Do while
m>n
Do while m>n:m=m-n:Loop
Do While
n>m:n=n-m:Loop
Loop
Myfun=m
End Function
Private Sub Command1_Click( )
Print myfun(15,15)
End Sub
[填空题]下面程序和运行运行结果是【 】。
typedef union student
{ char name [10];
long sno;
char sex;
float score [4];
} STU;
main ( )
{ STU a[5];
prinff( "% d/n", sizeof(a) );
}
[单项选择]下面程序运行的结果是( )。
#include<iostream>
using namespace std;
class A
protected:
int a;
public:
void input(int i)
a=i;
;
class B
protected:
int a;
public:
void input(int j)
a=j;
;
class C: public A, public B
int x;
public:
void input( )
x=A::a * B::a;cout<<x<<endl;
;
void main( )
C c;
c.A::input(5);
c.B::input(8);
c.input( );
A. 5
B. 8
C. 40
D. 编译出错
[填空题]
下面程序和运行运行结果是 【19】 。
typedef union student
{ char name [10];
long sno;
char sex;
float score [4];
} STU;
main ( )
{ STU a[5];
prinff( "% d/n", sizeof(a) );
}
[单项选择]下面程序的运行结果是( )。 public class OperatorsAndExpressions void equalsMethod1( ) //基本类型的数据之间的比较 int i=10,j=15; System.out,println(i==j); //复合数据类型的数据之间的比较 String s1=new String ("how are you"); String s2=new String ("how are you"); System.out.println(s1==s2): public static void main (String args[ ]) OperatorsAndExpressions OperAndExp=new OperatorsAndExpressions( ): //用于基本类型数据和复合类型数据的=="运算符 OperAndExp,equalsMethod1( )
A. false false
B. false true
C. tree false
D. true true