Inspiration
My friends and how much they don't like school
What it does
It's an adventure on how you're going to skip school that day
How I built it
I built it using c++ in Cloud9
Challenges I ran into
Finding where the bugs were
Accomplishments that I'm proud of
That is works
What I learned
Learned how to use Boolean and random numbers
If Cloud9 doesn't work here's the code
//How to Skip School
include
include
using namespace std;
int main() {
string willSkip = "yes";
string answer [24] ;
string willPlay = "yes";
//Math question
srand (time(NULL));
int random1 = rand()%51;
int random2 = rand()%51;
int randAnswer= random1+random2;
cout << "You're in school. It's 2nd period your least favorite class, math.\n You're exhausted and your teacher just asked you a question while you weren't paying attention\n Teacher: What is " << random1 << "+" << random2 << "?\n 'Uhhhhh...'\n Teacher: This is why you need to sleep at night *sigh*" << endl;
cout << "You're already thinking about leaving... Time to escape? [yes/no]" << endl;
cin >> willSkip;
while (willSkip == "yes"){
//Question1
cout << " Welcome to 'How to Skip School\n What do you do first?\n a)*Go to the hallway*\n b)*Sneak over to the window*" << endl;
cin >> answer[1];
if (answer[1] == "a"){
//Question2
cout<< "\nNow you're in the hallway, as you walk out you see Ms.Kutch. What do you do?[a/b]\n a)*Freeze and stay as quiet as possible* \n b)*Quickly run to a different part of the hall*" << endl;
cin>> answer[2];}
else{
cout<< "\nYou fall out the window and die.\n "<< endl;
return 0;
}
if (answer [2]== "b"){
//Question3
cout<< "\n You run to a different part of the hallway and you see a window to outside. What do you do? \n a)*Climb out of it* \n b)*keep walking through the hall*"<< endl;
cin>> answer [3];
}
else {
cout<< "\nShe sees you and you get a detention.\n"<< endl;
return 0;
}
if (answer [3]== "b"){
//Question4
cout<< "\n As you are walking you see a stairwell down to the 1st floor. What do you do? \n a)*Walk down* \n b)*Keep walking through the hall*."<< endl;
cin>> answer [4];}
else {
cout<< "\nYou fall out the window and die.\n"<< endl;
return 0;}
if (answer [4]== "a"){
//Question5
cout<< "\n While you're walking down the stairwell you hear someone walking up. What do you do? \n a)*Freeze and do nothing* \n b)* Run back up the stairs*."<< endl;
cin>> answer [5]; }
else {
cout<< "\nYou never find your way out.\n" << endl;
return 0;}
if (answer [5]== "a"){
//Question6
cout<< "\n You make it downstairs and you look around, to the right you see the cafeteria, to the left you see a library. Where do you go \n a)Right \n b)Left" << endl;
cin>> answer [6]; }
else {
cout<< "\n You run back up the stairs and the principal catches you. \n";
return 0;
}
if (answer [6] == "a"){
//Question7
cout << "\n There's a starbucks in the cafeteria... Will you... \na) get a frappe \nb) ignore your urges and keep going" << endl;
cin >> answer [7];
}
else {
cout << "You chose to be basic... I thought you were trying to escape???" << endl;
return 0;
}
if (answer [7] == "b"){
//Question8
cout << "\nThe exit is on the other side of the cafeteria, but your crush is walking over... do you? \na) Ignore your crush and run like Naruto to the door \nb)stop to talk to your crush" << endl;
cin >> answer [8];
}
else {
cout << "Stop swooning and get your self out of this school!" << endl;
return 0;
}
if(answer [8] == "a"){
//Question 9
cout << "All those years of watching Naruto paid off. Now you've managed to slip out of the door. Now... how do you get home? \na) Borrow a bike from someone in the neighborhood next to the school \nb) call an uber" << endl;
cin >> answer [9];
}
else {
cout << "\nYou're a broke high school kid. I don't think you even have money on you." << endl;
return 0;
}
if (answer [9] == "a"){
cout << "You hop on the bike, and start riding down the street. You see your mom's car driving up the street. You forgot that she has to drop something off for a PTA meeting. What are you to do now \na) Quickly pedal back to the school before she notices it's you \nb) Fall over into a bush" << endl;
cin >> answer [10];
return 0;
}
else {
cout << "\nShe see someone fall over, notices it's you. She grounds you for a life time" << endl;
return 0;
}
if (answer [10] == "a"){
cout << "You pedal behind the school, and you see your cousin getting into his car about to go to his internship \na) Drop the bike and run inside the school \nb) Hop into his car an tell him to DRIVE!"<< endl;
cin >> answer [11];
return 0;
}
}//end of willSkip
if (willSkip != "yes"){
cout<< "\nTerrible choice, you lose.";
}
return 0;
}
Log in or sign up for Devpost to join the conversation.