Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int testnumber();
- int b;
- int x;
- int a;
- int main()
- {
- cout << "Please select a level of difficulty" << endl;
- cout << "The level of difficulty ranks from 1 through to 6" << endl;
- cout << "Please select anywhere from 1, being the easiest, to 6 being the hardest" << endl;
- cin >> x;
- cout << "You have 5 guesses at the number" << endl;
- if(x==1){
- b=37;
- cout << "The number is between 1 and 100" << endl;
- };
- if(x==2){
- b=142;
- cout << "The number is between 1 and 200" << endl;
- };
- if(x==3){
- b=96;
- cout << "The number is between 1 and 300" << endl;
- };
- if(x==4){
- b=311;
- cout << "The number is between 1 and 400" << endl;
- };
- if(x==5){
- b=184;
- cout << "The number is between 1 and 500" << endl;
- };``````
- if(x==6){
- b=422;
- cout << "The number is between 1 and 600" << endl;
- };
- if(testnumber()==0){
- return 0; }
- if(testnumber()==0){
- return 0; }
- if(testnumber()==0){
- return 0; }
- if(testnumber()==0){
- return 0; }
- if(testnumber()==0){
- return 0; }
- cout << "The game has ended, and you have failed, YOU'RE A FUCKING SHIT CUNT!." << endl;
- return 0;
- }
- int testnumber()
- {
- cout << "Please enter your guess" << endl;
- cin >> a;
- if(a>b) {
- cout << "The number is lower than " << a << endl;
- }
- if(a<b) {
- cout << "The number is higher than " << a << endl;
- }
- if (a==b) {
- cout << "The number is correct" <<endl;
- return 0;
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement