#include <iostream>
using namespace std;
int main()
{
char w;
cout << "Welcome to the forest adventure game.\n";
cout << "You can bring one object.\n";
cout << " what object do you choose enter(f) for food (m) for map and (s) for sleeping bag.\n";
cin >> w;
cout << "You hear a sound do you go towards it enter (y) or (n)";//y means yes n means no
char t;
cin >> t;
if(t=='y'){
cout << "The sound gets louder and then it srikes you get killed by the lion you lose the game";
}if(t=='n'){
cout << "The sound gets quiter but now you are lost enter (c) to stop and shout for help enter (r) to carry on running";
char y;
cin >> y;
if(y== 'r'){
cout << "You find somebody homeless he says I will help you if you give me a sleeping bag.\n"
}if(w=='s'){
cout << "Lukily you choose correctly.\n"
;cout << "You win the game"
}if(w== 'm'){
cout << "You lose"
}if(w== 'f'){
cout << "You lose"
}
}
}
}
}
return 0;
}
main.cpp: In function ‘int main()’:
main.cpp:22:5: error: expected ‘;’ before ‘}’ token
}if(w=='s'){
^
main.cpp:25:5: error: expected ‘;’ before ‘}’ token
}if(w== 'm'){
^
main.cpp:27:5: error: expected ‘;’ before ‘}’ token
}if(w== 'f'){
^
main.cpp:30:5: error: expected ‘;’ before ‘}’ token
}
^
main.cpp: At global scope:
main.cpp:33:5: error: expected declaration before ‘}’ token
}