#VC09. 趣味编程09选择题

趣味编程09选择题

  1. 在下面设备中,( )属于计算机的输入设备。 {{ select(1) }}
  • 显示器
  • 绘图仪
  • 打印机
  • 鼠标
  1. 阅读程序写结果。
#include <iostream>
using namespace std;
int main()
{
  int s,a,b,c; 
  cin>>s>>a>>b>>c;
  s -= a;
  s -= b;
  s -= c;
  cout << "ans="<<s<<endl;
  return 0;
}

输入:200 10 20 30 50
输出:______ {{ select(2) }}

  • 140
  • 90
  • ans=140
  • ans=90
  1. 完善程序。
    从键盘输入长方形的长和宽,输出长方形的周长。
#include ‹ iostream› 
using namespace std;
int main()
{
  int a,b,c;
  _____;
  c = (a + b) * 2;
  cout<<"周长:"<<_____<<endl;
  return 0;
}

{{ select(3) }}

  • cin>>a>>b>>c, c
  • cin>>a,b, c
  • cin>>a>>b, c
  • cin>>a,b,c, c