假定有以下程序:Private Sub Form_Click()a=1:b=aDo Until a=5x=a*bPrint b;xa=a+bb=b+aLoopEnd Sub程序运行后,单击窗体,输出结果是A.1 1 2 3B.1 1 2 4C.1 1 3 8D.1 1 3 6

假定有以下程序:

Private Sub Form_Click()

a=1:b=a

Do Until a>=5

x=a*b

Print b;x

a=a+b

b=b+a

Loop

End Sub

程序运行后,单击窗体,输出结果是

A.1 1 2 3

B.1 1 2 4

C.1 1 3 8

D.1 1 3 6


相关考题:

假定有以下程序: Private Sub Form. Click( ) a=1:b=a Do Until a=5 x=a*b Print b;X a=a+b b=b+a Loop End Sub 程序运行后,单击窗体,输出结果是( )。A.1 1 2 3B.1 1 2 4C.1 1 3 8D.1 1 3 6

以下程序的输出结果是()。includemain(){int a=21,b=11; printf("%d\n",--a+b,--b+a);} 以下程序的输出结果是( )。 #include <stdio.h> main() { int a=21,b=11; printf("%d\n",--a+b,--b+a); }A.30B.31C.32D.33

有以下程序:includeincludeusing namespace std; class point{private:double 有以下程序: #include<iostream> #include<math> using namespace std; class point { private: double x; double y; public: point(double a,double B) { x=a; y=b; } friend double distance (point a,point B) ;A.1B.5C.4D.6

若有以下程序: include usingnamespace std; class Sample { private: const int n; 若有以下程序:include <iostream>using namespace std;class Sample{private:const int n;public:Sample(int i) :n(i) {)void print(){cout<<"n="<<n<<end1;}};int main(){sample a(10);a.print();return 0;}上述程序运行后的输出结果是【 】。

以下程序段中,与语句:k=a>b?(b>c?1:O):0;功能相同的是( )。

有以下程序:include include using namespace std;class Y;class X{private 有以下程序: #include <iostream> #include <string> using namespace std; class Y; class X { private: int x; char *strx; public: X(int a, char *str) { x=a; strx=new char[strlen(str)+1]; strcpy(strx,str); } void show(Y ob) ; }; class Y { private: int y; char *stry; public: Y(int b,char *str) { y=b; stry=new char[strlen(str)+1]; strcpy(stry, str); } friend void X: :show(Y ob) ; }; void X: :show(Y ob) { cout<<strx<<", "; cout<<ob, stry<<end1; } int main ( ) { X a(10,"X"); Y b (20, "Y"); a. show(B) ; return 0; } 执行后的输出结果是( )。A.X,YB.a,bC.X,XD.Y,Y

若有以下程序:include using namespace std;class point{private: int x, y;public: 若有以下程序: #include <iostream> using namespace std; class point { private: int x, y; public: point ( ) { x=0; y=0; } void setpoint(int x1,int y1) { x=x1; y=y1;A.12,12B.5,5C.12,5D.5,12

以下程序段执行完后,变量A和B的值分别是( )。 A=1 B=A DO UNTIL A> =5 A=A+B B=B+A LOOPA.1, 1B.4, 6C.5, 8D.8, 13

若有int i=1, xa; 则执行以下程序段后i的值是(). for(xa=1;xa<5;i++) xa++;A.6B.4C.3D.5