#C01L03P01. C01.L03.整除及求余、数字的提取、顺序结构程序.课前复习1~3

C01.L03.整除及求余、数字的提取、顺序结构程序.课前复习1~3

题目一:变量的赋值(1)

看程序写结果

#include<iostream>
using namespace std;
int main()
{
    int a,b,c;

    a=5;
    b=4;
    c=a-b;
    cout<<c;

    return 0;
}

{{ select(1) }}

  • 4
  • 5
  • 1
  • 3

题目二:变量的赋值(2)

看程序选结果

#include<iostream>
using namespace std;
int main()
{
	int a,b;

	a=5;
	b=4;
	a=10;
	cout<<a-b;

	return 0;
}

{{ select(2) }}

  • 5
  • 10
  • 1
  • 6

题目三:变量的赋值(3)

看程序选结果

#include<iostream>
using namespace std;
{
	int a,b,c;

	a=5;
	b=4;
	a=a+b;
	b=b-1;
	c=a-b;

	cout<<c;

   return 0;
}

{{ select(3) }}

  • 1
  • 2
  • 4
  • 6