第16课 开灯关灯 《小学生C++趣味编程》

#include<iostream>
using namespace std;
int main()
{
	bool light=false; 
   
	light=!light;  //拉一下开关
	light=!light; 
	light=!light;  
	light=!light;  
	light=!light;  
  
	if(light) 
		cout<<"灯亮";
	else
		cout<<"灯灭";
		
	return  0; 
}

 

NOI题库 编程基础之 1.1-1.7 python版代码(2021.11.22).rar

 https://download.csdn.net/download/dllglvzhenfeng/48155356

小学生C++ Scratch源代码(2021.11.11).zip

https://download.csdn.net/download/dllglvzhenfeng/43461153

CSP-J入门组 历年真题 第1题(部分)python版.zip

https://download.csdn.net/download/dllglvzhenfeng/43462484

猜你喜欢

转载自blog.csdn.net/dllglvzhenfeng/article/details/121874566