PLAY(2.0)

改进了一下程序

但还没有真正的快乐感

#include<bits/stdc++.h>
using namespace std;
int x;
void showMenu() {
	cout<<"*************************"<<endl;
	cout<<"***** 1、PLAY ***********"<<endl;
	cout<<"***** 0、退出 ***********"<<endl;
	cout<<"*************************"<<endl;
}
void cao() {
	cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
	cout<<"                                  Let's play!"<<endl;
}
void hh() {
	system("cls");
	cao();
	while(1) {
		system("color 1");
		system("color 2");
		system("color 3");
		system("color 4");
		system("color 5");
		system("color 6");
		system("color 7");
		system("color 8");
		system("color 9");
		system("color 10");
		system("color 11");
		system("color 12");
		system("color 13");
		system("color 14");
		system("color 15");
	}
}
int main() {
	while(1) {
	showMenu();
		cin>>x;
		switch(x) {
			case 1:
				hh();
				break;
			case 0:
				break;
			default:
				hh();
				break;
		}
		if(x==0)
			break;
	}

	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_55599629/article/details/121582035