以下程序段:Private Sub Form_Load( )Dim Nop As Integer, Op As String * 1Num1 = 3Num2 = 2Nop = val(Inputbox("请输入1-4之间的整数"))Select Case NopCase 1Op = "+"Result = Num1 + Num2Case 2Op = "-"Result = Num1 - Num2Case 3Op = "×"Result = Num1 * Num2Case 4Op = "÷"Result = Num1 / Num2End SelectLabel1= Num1 & Op & Num2 & "=" & ResultEnd Sub窗体运行后,输入1,则label1的标题显示结果为()A.3+2=5B.3-2=1C.3×2=6D.3÷2=1.5
以下程序段:
Private Sub Form_Load( )
Dim Nop As Integer, Op As String * 1
Num1 = 3
Num2 = 2
Nop = val(Inputbox("请输入1-4之间的整数"))
Select Case Nop
Case 1
Op = "+"
Result = Num1 + Num2
Case 2
Op = "-"
Result = Num1 - Num2
Case 3
Op = "×"
Result = Num1 * Num2
Case 4
Op = "÷"
Result = Num1 / Num2
End Select
Label1= Num1 & Op & Num2 & "=" & Result
End Sub
窗体运行后,输入1,则label1的标题显示结果为()
A.3+2=5
B.3-2=1
C.3×2=6
D.3÷2=1.5
相关考题:
下列程序中,实现将封装数据类型Integer和基本数据类型int之间的转换,以及Integer,int类型和String类型之间的转换。请将程序补充完整。程序运行结果如下:123456456public class ex7_1{public static void main(String[]args) {Integer intObj;int n;String s;intObj = new Integer(123);n=intObj.__________;System.out.printin(Integer.toString(n));s=new String("456");intObj=Integer._________;System.out.println(intObj.__________);n=Integer.parseInt(s);System.out.println(Integer.toString(n));}}
以下程序段共有错误()处。include using namespaces std;class Sample{private: int n 以下程序段共有错误( )处。 #include <iostream> using namespaces std; class Sample { private: int n; public: Sample(int i) { n=i; } void setvalue (int i) { n=i; } void display() { cout<<”n=”<<n<<endl; } }; int main() { const Sample a(10); a.setvalue(5); a.display(); return 0; }A.1B.2C.3D.4
有以下程序:include include using namespace std;class base{private: cha 有以下程序: #include <iostream> #include <string> using namespace std; class base { private: char baseName[10]; public: base ( ) { strcpy (baseName, "Base"); } virtual char *myName() {A.DerivedBaseB.BaseBaseC.DerivedDerivedD.BaseDerived
以下程序段共有错误()处。include using namespaces std;class Sample{private:int n; 以下程序段共有错误( )处。 #include <iostream> using namespaces std; class Sample { private: int n; public: Sample (int i) { n=i; } void setvalue(int i) { n=i; } void display() { cout<<"n="<<n<<endl ; } }; int main() { const Sample a(10); a.setvalue (5); a.display(); return 0; }A.1B.2C.3D.4
以下程序段有()处错误。include using namespaces std;class Sample{private: int n;p 以下程序段有( )处错误。 #include <iostream> using namespaces std; class Sample { private: int n; public: Sample (int i} { n=i; } void setvalue(int i) { n=i; } void display() { cout<<"n="<<n<<end1; } }; int main ( ) { const Sample a(lO); a. setvalue (5)'; a.display(); return 0; }A.1B.2C.3D.4
以下程序段运行时从键盘上输入字符“-”,则输出结果为 op$=InputBox("op=") If op$="+" Then a=a+2 If op$="-" Then a=a-2 Print aA.2B.-2C.0D.+2
指出下列程序段执行后AL内容是 MOV AL, 60H CMP AL, 0BBH JB L2 L1:MOV AL, 0BBH L2:NOP ;NOP为空操作