0
点赞
收藏
分享

微信扫一扫

3.2赋值运算符

承蒙不弃 2022-05-04 阅读 58
#include <iostream>
using namespace std;
/*
/=
*=
%=
*/
int main()
{
	int a = 2;
	a += 2;
	cout << a << endl;
	system("pause");
	return 0;
}
#include <iostream>
using namespace std;

int main()
{
	int a = 10;
	int b = 3;
	cout << a / b << endl;
	//整数相除,仍然是整数
	cout << a%b << endl;//取余数
	//小数不能取余
	++a;
	cout<<
	system("pause");
	return 0;
}
举报

相关推荐

0 条评论