武汉加油 !

#include<cstdio>
#include<cstring>
#include<iostream>
#include<string>
using namespace std;



int main(){
	string s;
	int virus=0;                      // 还没有病毒时 
	bool strength=false,love=false;         //爱和力量还在隐形状态 
	int need=0;                   //武汉人民需求初始化为0 
	int volunteer=0,doctor=0;   //支援武汉支援者,医生护士初始化为0 
	cout<<"当病毒来势迅猛"<<endl;
	cout<<"其以指数倍数的形式增加:"<<endl;
	printf("\n");
	cin>>s;                                             
	for(int i=1;i<=64832;i+=i){
		virus+=i;       //病毒指数增长    
		need+=i;        //需求指数型增长 
		 printf("%d\n",i);
	}
	int ww=virus;
	while(virus){          // 当病毒猖獗之时 
		if(need>volunteer)   //支援武汉的支援者来了 
		volunteer++;          // 支援者多了起来 
		else love=true;    //  爱凝聚了起来 
		if(virus>doctor)    //   如果病毒太多 
		doctor++;          //    全国各地组成的医疗队伍也来支援武汉了 
		else strength=true;    //   力量也凝聚了起来 
		
		if(love&&strength){          //   if love and strength 都有了 
			virus=0;  //疫情终将会被打败 
		}
	}
	
	for(;;){                 //  新型冠状病毒在一点点消失 
		if(ww<=0)break;
		cout<<ww<<endl;
		ww-=10000;
	}
	
	cin>>s;
	cout<<"heart being together"<<endl;
	cin>>s;
	cout<<"China will be  better"<<endl;
	cin>>s;
	cout<<"spring will come"<<endl;
	//   若运行程序遇到卡顿  输入           武汉加油 
	return 0;
}
 
发布了2 篇原创文章 · 获赞 0 · 访问量 13

猜你喜欢

转载自blog.csdn.net/peizhecpp/article/details/104394192
今日推荐