• 个人简介

    
    1.求生游戏A(语言:c++98)
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
      cout<<"求生游戏A开始,请输入0/1/2/3";
    int a;cin>>a;
    if(a%4==0){
    	cout<<"你被老虎咬死了 游戏失败";
    }
    else if(a%4==1){
    	cout<<"你幸运地存活了下来 游戏成功"; 
    }
    else if(a%4==2){
    	cout<<"你被老虎咬得半死半活 游戏失败";  
    }
    else if(a%4==3){
    	cout<<"你被鲨鱼吃了,又诈尸了 游戏成功";  
    }
    }
    
    2.求生游戏B(语言:c++98)
    
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        cout<<"求生游戏B开始,请输入三个不同的数";
        int a;
        int b;
        int c;
        cin>>a>>b>>c;
        if(a>b and a>c){
        	cout<<"你被炸弹炸死了 游戏失败";
    	}
    	else if(b>a and b>c){
    		cout<<"你幸运地存活了下来 游戏成功";
    	}
    	else{
    		cout<<"你被岩浆烫死了 游戏失败";
    	}
      }
    
      
    3.什么球(语言:c++98)
    
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	cout<<"这是什么球 O\n0:篮球 1:足球 2:排球 3:乒乓球\n";
    	int a;
    	cin>>a;
    	if(a%4==0){
    		cout<<"错,是足球\n"; 
    	}
    	if(a%4==1){
    		cout<<"错,是篮球\n"; 
    	}
    	if(a%4==2){
    		cout<<"错,是足球\n"; 
    	}
    	if(a%4==3){
    		cout<<"错,是足球\n"; 
    	}
    	cout<<"再来一次,这是什么球 O\n0:篮球 1:足球 2:排球 3:乒乓球\n";
    	int b;
    	cin>>b;
    	if(a%4==0){
    		cout<<"错,是排球\n"; 
    	}
    	if(a%4==1){
    		cout<<"错,是排球\n"; 
    	}
    	if(a%4==2){
    		cout<<"错,是足球\n"; 
    	}
    	if(a%4==3){
    		cout<<"错,是排球\n"; 
    	}
    	cout<<"最后再来一次,这是什么球 O\n0:篮球 1:足球 2:排球 3:乒乓球\n";
    	int c;
    	cin>>c;
    	if(c%4==0){
    		cout<<"错,是乒乓球\n"; 
    	}
    	if(c%4==1){
    		cout<<"错,是乒乓球\n"; 
    	}
    	if(c%4==2){
    		cout<<"错,是乒乓球\n"; 
    	}
    	if(c%4==3){
    		cout<<"错,是排球\n"; 
    	}
    }
    
    4.你是狗吗(语言:c++98)
    
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	cout<<"你是狗吗\n0: 是 1:不是 2:不是也是 3:是也不是\n";
    	int a;
    	cin>>a;
    	if(a%4==0){
    		cout<<"你是一只诚实的狗\n"; 
    	}
    	if(a%4==1){
    		cout<<"你是一只不诚实的狗\n"; 
    	}
    	if(a%4==2){
    		cout<<"你是一只正常的狗\n"; 
    	}
    	if(a%4==3){
    		cout<<"你是一只普通的狗\n"; 
    	}
    	cout<<"你是人吗\n0: 是 1:不是 2:不是也是 3:是也不是\n";
    	int b;
    	cin>>b;
    	if(b%4==0){
    		cout<<"你是一个不诚实的人\n"; 
    	}
    	if(b%4==1){
    		cout<<"你是一个诚实的人\n"; 
    	}
    	if(b%4==2){
    		cout<<"你是一个正常的人\n"; 
    	}
    	if(b%4==3){
    		cout<<"你是一个普通的人\n"; 
    	}
    }
    
    5.丧尸末日【坑人版】(语言:c++98)
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	cout<<"游戏开始,请选择你要去的地点 0家里 1学校 2厕所\n"; 
    	int a;
    	cin>>a;
    		if(a%3==0){
    		cout<<"家里来了一群丧尸,你打算怎样 0逃走 1躲进房间 2不动\n";
    		int b ;
    		cin>>b;
    		if(b%3==0){
    			cout<<"你一推开门,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int c;
    			cin>>c;
    			if(c%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(b%3==1){
    			cout<<"你一进房间,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int d;
    			cin>>d;
    			if(d%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(b%3==2){
    			cout<<"你被丧尸吃了,游戏失败\n"; 
    		}
    	}
    	if(a%3==1){
    		cout<<"学校里来了一群丧尸,你打算怎样 0逃走 1躲进教室 2不动\n";
    		int e ;
    		cin>>e;
    		if(e%3==0){
    			cout<<"你一出大门,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int f;
    			cin>>f;
    			if(f%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(e%3==1){
    			cout<<"你一进教室,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int g;
    			cin>>g;
    			if(g%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(e%3==2){
    			cout<<"你被丧尸吃了,游戏失败\n"; 
    		}
    	}
    	if(a%3==2){
    		cout<<"厕所里来了一群丧尸,你打算怎样 0逃走 1躲进隔间 2不动\n";
    		int h ;
    		cin>>h;
    		if(h%3==0){
    			cout<<"你一跑出去,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int i;
    			cin>>i;
    			if(i%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(h%3==1){
    			cout<<"你一进隔间,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int j;
    			cin>>j;
    			if(j%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(h%3==2){
    			cout<<"你被丧尸吃了,游戏失败\n"; 
    		}
    	}
    }
    
    6.丧尸末日【正常版】(语言:c++98)
    
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	cout<<"游戏开始,请选择你要去的地点 0家里 1学校 2厕所\n"; 
    	int a;
    	cin>>a;
    		if(a%3==0){
    		cout<<"家里来了一群丧尸,你打算怎样 0逃走 1躲进房间 2不动\n";
    		int b ;
    		cin>>b;
    		if(b%3==0){
    			cout<<"你一推开门,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int c;
    			cin>>c;
    			if(c%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(b%3==1){
    			cout<<"你一进房间,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int d;
    			cin>>d;
    			if(d%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(b%3==2){
    			cout<<"丧尸死了,你逃了出去,游戏成功"; 
    		}
    	}
    	if(a%3==1){
    		cout<<"学校里来了一群丧尸,你打算怎样 0逃走 1躲进教室 2不动\n";
    		int e ;
    		cin>>e;
    		if(e%3==0){
    			cout<<"你一出大门,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int f;
    			cin>>f;
    			if(f%2==0){
    				cout<<"你诈尸后丧尸已经死了,你逃走了,游戏成功\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(e%3==1){
    			cout<<"你一进教室,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int g;
    			cin>>g;
    			if(g%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(e%3==2){
    			cout<<"你被丧尸吃了,游戏失败\n"; 
    		}
    	}
    	if(a%3==2){
    		cout<<"厕所里来了一群丧尸,你打算怎样 0逃走 1躲进隔间 2不动\n";
    		int h ;
    		cin>>h;
    		if(h%3==0){
    			cout<<"你一跑出去,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int i;
    			cin>>i;
    			if(i%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(h%3==1){
    			cout<<"你一进隔间,又是丧尸,你被咬死了 现在你要诈尸吗 0要 1不\n";
    			int j;
    			cin>>j;
    			if(j%2==0){
    				cout<<"你诈尸后又被吃了,游戏失败\n"; 
    			}
    			else{
    				cout<<"游戏失败\n"; 
    			} 
    		}
    		if(h%3==2){
    			cout<<"你被丧尸吃了,游戏失败\n"; 
    		}
    	}
    }
    
    
    
  • 通过的题目

  • 最近活动

  • 最近编写的题解

    This person is lazy and didn't write any solutions.

题目标签

普及-
21
模拟
17
搜索
5
枚举
5
顺序结构
4
数组
4
语言入门
3
循环结构
3
入门
2
二维数组
2
选择语句
2
其他
1
数学
1
分支结构
1
计算几何
1
For循环
1
一本通
1
运算
1