1)#include2)usingnamespacestd;3)intmain()4){5)inta,b,result;6)cout<<"pleaseinputtwonumbers:\n";7)cin>>a>>b;8)result=3*a-2*b+1;9)cout<<"resultis"<A: cout<;<;&rdquo;Iamastudent.\n”
B: ";Iamastudent.\n&rdquo;
C: Iamastudent.
D: Iamastudent.\n
B: ";Iamastudent.\n&rdquo;
C: Iamastudent.
D: Iamastudent.\n
举一反三
- 1)#include<iostream>2)usingnamespacestd;3)intmain()4){5)inta,b,result;6)cout<<"pleaseinputtwonumbers:\n";7)cin>>a>>b;8)result=3*a-2*b+1;9)cout<<"resultis"<<result<<endl;10)}程序第5行定义了几个整型变量:() A: 1 B: 2 C: 3 D: 4
- 1)#include<iostream>2)usingnamespacestd;3)intmain()4){5)inta,b,result;6)cout<<"pleaseinputtwonumbers:\n";7)cin>>a>>b;8)result=3*a-2*b+1;9)cout<<"resultis"<<result<<endl;10)}程序第5行执行结束后,a的值是多少:() A: 0 B: 1 C: -1 D: 随机值
- 1)#include2)usingnamespacestd;3)intmain()4){5)inta,b,result;6)cout<<"pleaseinputtwonumbers:\n";7)cin>>a>>b;8)result=3*a-2*b+1;9)cout<<"resultis"<<result<<endl;10)} 程序执行到第8行时,假设此时输入“4空格5”,则a的值是:() A: 0 B: 4 C: 5 D: 不确定
- 下列程序的运行结果是:#include<iostream>usingnamespacestd;intmain(){inta=2;intb=a+1;cout<<a/b<<endl;return0;}
- 【填空题】下列程序的输出结果是________。#include<iostream>usingnamespacestd;intf(inta,intb){staticintx=3;if(b>2){x=x*x;b=x;}elseb=x+1;returna+b;}intmain(){inta=3,b;b=2;cout<<f(a,b)<<endl;b=3;cout<<f(a,b);return0;}