#VC07. 趣味编程07选择题
趣味编程07选择题
- 计算机能直接识别的程序是() {{ select(1) }}
- Python语言编写的源程序
- C++语言编写的源程序
- 机器语言编写的程序
- 各种高级语言编写的源程序
- 阅读程序写结果。
#include ‹iostream>
using namespace std;
int main()
{
int a, b;
a=100;
b=200;
a = b - a;
b -= a;
a += b;
cout<<"a="<<a <<" b="<<b<<endl;
return 0;
}
输出:_______ {{ select(2) }}
- 200 100
- 100 200
- a=200 b=100
- a=100 b=200
- 完善程序。
一个三位数,百位上的数比十位上的数大1,个位上的数是百位上的数的2倍,若十位上的数力3,这个三位数是多少?
#include<iostream>
using namespace std;
int main ( )
{
int ge, shi, bai, shu;
shi=3;
__________;
ge=bai*2;
__________;
cout<<"shu="<<shu<<endl;
return 0;
}
{{ select(3) }}
- bai=shi+1, shu=bai+shi+ge
- bai=shi*2, shu=bai+shi+ge
- bai=shi+1, shu=bai*100+shi*10+ge
- bai=shi+1, shu=ge*100+shi*10+bai