c++剧情小游戏

用c++做了一个超好玩的剧情小游戏,成为我的粉丝可以免费收看,大家能给我点点赞么?谢谢

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstring>
#include<sstream>
#include<windows.h>
#include<bits/stdc++.h>
using namespace std;
void xsjq(){
	cout<<"今天是美妙的一天";
	_getwch();
	system("cls");
	cout<<"你昨晚睡得太迟了";
	_getwch();
	system("cls");
	cout<<"此时,你正考虑着是否上学";
	_getwch();
	system("cls");
	cout<<"y表示上学,n表示算了吧,这学上的也没啥用";
	char dygxz;
	int nddygxz,du,lws;
	cin>>dygxz;
	switch (dygxz) {
	case 'y':
		//TODO
		cout<<"你是个好孩子";
		_getwch();
		system("cls");
		cout<<"你到了班级";
		_getwch();
		system("cls");
		cout<<"一群调皮鬼约你去网吧";
		_getwch();
		system("cls");
		cout<<"1.去   2.我才不去呢";
		cin>>nddygxz;
		switch (nddygxz) {
		case 1:
			//TODO
			system("cls");
			cout<<"在楼道,你们遇到了主任老师,你们想逃跑,却被抓住了";
			_getwch();
			system("cls");
			cout<<"你们被严重批评";
			_getwch();
			system("cls");
			cout<<"达成结局:被批评";
			_getwch();
			system("cls");
			break;
		case 2:
			//TODO 
			system("cls");
			cout<<"你没有去";
			_getwch();
			system("cls");
			cout<<"这时老师走进教室,带着你们早读";
			_getwch();
			system("cls");
			cout<<"可是你不会背唐诗";
			_getwch();
			system("cls");
			cout<<"请选择:1.亡羊补牢,为时不晚 抓紧时间背(%50成功率)    2.不背,老师不会抽我(也是%50成功率)";
			cin>>du;
			switch (du) {
			case 1:
				//TODO
				system("cls");
				cout<<"你认真背呀背";
				_getwch();
				system("cls");
				srand(time(0));
				lws=rand()%2+1;
				if(lws==1){
					cout<<"你还没背完,老师就抽到了你";
					_getwch();
					system("cls");
					cout<<"你背不出来,老师罚你抄写1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000遍";
					_getwch();
					system("cls");
					cout<<"达成结局:被罚抄(仿佛有亿点点惨)";
					_getwch();
					system("cls");
				}
				else{
					cout<<"你背着背着";
					_getwch();
					system("cls");
					cout<<"突然会背了";
					_getwch();
					system("cls");
					cout<<"耶耶耶!";
					_getwch();
					system("cls");
					cout<<"达成结局:亡羊补牢(补得真及时)";
					_getwch();
					system("cls");
				}
				break;
			case 2:
				//TODO
				system("cls");
				cout<<"你没有背!";
				_getwch();
				system("cls");
				srand(time(0));
				lws=rand()%2+1;
				if(lws==1){
					cout<<"老师就抽到了你";
					_getwch();
					system("cls");
					cout<<"你背不出来,老师罚你抄写1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000遍";
					_getwch();
					system("cls");
					cout<<"达成结局:被罚抄(仿佛有亿点点惨)";
					_getwch();
					system("cls");
				}
				else{
					cout<<"老师没抽到你";
					_getwch();
					system("cls");
					cout<<"啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊!我太开心啦!";
					_getwch();
					system("cls");
					cout<<"达成结局:蒙混过关(运气太好了吧)";
					_getwch();
					system("cls");
				}
				break;
			}
			break;
		}
		break;
	case 'n':
		//TODO
		system("cls");
		cout<<"你没有去上学";
		_getwch();
		system("cls");
		cout<<"此时,妈妈从门前经过";
		_getwch();
		system("cls");
		cout<<"她说:吃早饭啦@!@";
		_getwch();
		system("cls");
		cout<<"你选择:1.乖乖吃饭  2.睡着不理她";
		cin>>nddygxz;
		if(nddygxz==2){
			system("cls");
			cout<<"妈妈见你不理她,很生气,将你狠狠地修理了一顿!";
			_getwch();
			system("cls");
			cout<<"达成结局:被修理";
			_getwch();
			system("cls");
		}
		else{
			system("cls");
			cout<<"妈妈见你乖乖吃饭,很高兴,原谅了你不上学";
			_getwch();
			system("cls");
			cout<<"达成结局:被原谅";
			_getwch();
			system("cls");
		}
		break;
	}
}
int main(){
	system("mode con cols=100 lines=30");
	system("color f0&&title 小游戏");
	cout<<"欢迎游玩剧情小游戏!\n";
	Sleep(1000);
	cout<<"请输入您的年龄,我们为此判断为你上演的剧情\n";
	Sleep(1000);
	cout<<"提示:讲完一句话按下任意键显示下一句话\n";
	cout<<"你的年龄是:";
	int nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn;
	cin>>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn;
	if(nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<=17){
		cout<<"为您上演,学生剧情";
		Sleep(1000);
		system("cls");
		xsjq();
	}
	else{
		cout<<"暂未开放成人剧情,先为您上演学生剧情";
		Sleep(1000);
		system("cls");
		xsjq();
	}
	return 0;
}

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值