1#include <iostream>
2#include<cmath>
3// not perfect tho
4using namespace std;
5
6int guessgame(int guessnum){
7 int numberguess =0;
8 int limit = 5;
9 switch(guessnum){
10 case 9:
11 cout<< "you win";
12 break;
13 default:
14
15 while(guessnum != 9&& numberguess < limit){
16
17 cout << "too bad please try again: ";
18 cin >> guessnum;
19 numberguess++;
20 }
21}
22 if (numberguess <= limit&& numberguess > 0){
23 cout<< "you still win anyway ";}
24 else if(numberguess = limit && numberguess >0){ cout << "you lose";}
25}
26
27
28
29
30
31
32