Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* HEADERS */
- #include <iostream>
- #include <conio.h>
- #include <windows.h>
- #include <cmath>
- #include <string>
- using namespace std;
- int main()
- {
- system("COLOR 07");
- char personsName[80];
- cout << "Before we begin, what is your name? " << endl;
- cin >> personsName;
- system("CLS");
- Sleep(30);
- cout << " H";
- Sleep(30);
- cout << "e";
- Sleep(30);
- cout << "l";
- Sleep(30);
- cout << "l";
- Sleep(30);
- cout << "o";
- Sleep(30);
- cout << ",";
- Sleep(30);
- cout << " ";
- Sleep(30);
- cout << personsName;
- Sleep(30);
- cout << ".";
- Sleep(700);
- cout << endl;
- Sleep(30);
- cout << " I";
- Sleep(30);
- cout << "'";
- Sleep(30);
- cout << "m ";
- Sleep(30);
- cout << "a ";
- Sleep(30);
- cout << "c";
- Sleep(30);
- cout << "o";
- Sleep(30);
- cout << "m";
- Sleep(30);
- cout << "p";
- Sleep(30);
- cout << "u";
- Sleep(30);
- cout << "t";
- Sleep(30);
- cout << "e";
- Sleep(30);
- cout << "r";
- Sleep(30);
- cout << ".";
- Sleep(3500);
- system("CLS");
- system("COLOR 06");
- cout << endl << endl << endl << endl << endl;
- Sleep(100);
- cout << " I ";
- Sleep(100);
- cout << "will ";
- Sleep(100);
- cout << "count ";
- Sleep(100);
- cout << "down ";
- Sleep(100);
- cout << "from ";
- Sleep(100);
- cout << "5, ";
- Sleep(100);
- cout << "and ";
- Sleep(100);
- cout << "when ";
- Sleep(100);
- cout << "I ";
- Sleep(100);
- cout << "get ";
- Sleep(100);
- cout << "to ";
- Sleep(100);
- cout << "0, ";
- Sleep(100);
- cout << "the ";
- Sleep(100);
- cout << "quiz ";
- Sleep(100);
- cout << "will ";
- Sleep(100);
- cout << "begin. ";
- cout << endl << endl;
- Sleep(100);
- cout << "You ";
- Sleep(100);
- cout << "will ";
- Sleep(100);
- cout << "be ";
- Sleep(100);
- cout << "asked ";
- Sleep(100);
- cout << "five ";
- Sleep(100);
- cout << "questions. ";
- Sleep(100);
- cout << "Answer ";
- Sleep(100);
- cout << "them ";
- Sleep(100);
- cout << "correctly ";
- Sleep(100);
- cout << "or ";
- Sleep(100);
- cout << "you ";
- Sleep(100);
- cout << "must ";
- Sleep(100);
- cout << "repeat ";
- Sleep(100);
- cout << "the ";
- cout << endl << endl;
- Sleep(100);
- cout << " question. ";
- Sleep(100);
- cout << "GOOD ";
- Sleep(100);
- cout << "LUCK ";
- Sleep(100);
- cout << "!";
- Sleep(5000);
- system("CLS");
- char y;
- char n;
- char z;
- int a;
- int b;
- int c;
- int d;
- int e;
- system("COLOR 80");
- cout << endl << endl << endl << endl << endl;
- cout <<" * *"<< endl;
- cout << " You will have endless time to answer." << endl;
- cout <<" * *"<< endl;
- cout << " Are you ready? Enter y for yes, n no." << endl;
- cout << " ";
- do
- {
- cin >> z;
- if ( z == 'y' )
- {
- system("CLS");
- /* COUNTDOWN */
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;;
- cout << " FIVE";
- Sleep(1000);
- system("CLS");
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;
- cout << " FOUR";
- Sleep(1000);
- system("CLS");
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;
- cout << " THREE";
- Sleep(1000);
- system("CLS");
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;
- cout << " TWO";
- Sleep(1000);
- system("CLS");
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;
- cout << " ONE";
- Sleep(1000);
- system("CLS");
- cout << endl << endl << endl << endl << endl << endl << endl << endl << endl;
- cout << " ...";
- Sleep(1000);
- system("CLS");
- /* THE QUESTIONS */
- cout << "QUESTION 1: How many fingers do you have?" << endl;
- do{
- cin >> a;
- if (a == 10)
- {
- cout << "Correct, on to question 2." << endl;
- Sleep(2000);
- system("CLS");
- }
- else
- {
- cout << "Silly, you're a human not an alien! Think again." << endl;
- }
- } while (a != 10);
- /* ******************************************************** */
- cout << "QUESTION 2: What is the sum of 17 and 33?" << endl;
- do{
- cin >> b;
- if (b == 50)
- {
- cout << "Correct, on to question 3." << endl;
- Sleep(2000);
- system("CLS");
- }
- else
- {
- cout << "Back to 1st grade.. guess again." << endl;
- }
- } while (b != 50);
- /* ******************************************************** */
- cout << "QUESTION 3: If x = 7, and y = -3, what is x + y?" << endl;
- do{
- cin >> c;
- if (c == 4)
- {
- cout << "Correct, on to question 4." << endl;
- Sleep(2000);
- system("CLS");
- }
- else
- {
- cout << "Really.. thats so simple.. go again." << endl;
- }
- } while (c != 4);
- /* ******************************************************** */
- cout << "QUESTION 4: How many planets are in our Solar System?" << endl;
- do{
- cin >> d;
- if (d == 9)
- {
- cout << "Correct, on to question 5." << endl;
- Sleep(2000);
- system("CLS");
- }
- else
- {
- cout << "Tsk tsk tsk! Study harder.. try again." << endl;
- }
- } while (d != 9);
- /* ******************************************************** */
- cout << "QUESTION 2: How old are you?" << endl;
- do{
- cin >> e;
- e = e;
- if (e > 25)
- cout << "You're not THAT old.. " << endl;
- else if (e < 12)
- cout << "You're wayyy older than that! " << endl;
- else
- {
- cout << "You ARE " << e << " years old!" << endl;
- Sleep(2000);
- system("CLS");
- /* ENDING */
- cout << " ------------------------------------------------ " << endl
- << " / / " << endl
- << " | This was my first ever program made using C++ | " << endl
- << " | programming language! I hopy you enjoyed it | " << endl
- << " | as much as I enjoyed making it! I have aspir- | " << endl
- << " | ations to major in Computer Science after I | " << endl
- << " | graduate from High School and go off to Univ- | " << endl
- << " | ersity. Programming is very intriguing... Be | " << endl
- << " | prepared to see many more videos in the future| " << endl
- << " | with bigger more complex programs aswell. This| " << endl
- << " | was my first, so dont hate. cout << 'THE END';| " << endl
- << " / / " << endl
- << " ------------------------------------------------ " << endl;
- }
- } while (e != 13 || e != 14 || e != 15 || e != 16 || e != 17 || e != 18 || e != 19 || e != 20 || e != 21 || e != 22 || e != 23 || e != 24 || e != 25);
- }
- else if ( z == 'n' )
- {
- system("CLS");
- cout << "Thats okay, I'll wait. Type in y when you're ready!" << endl;
- }
- else
- {
- system("CLS");
- cout << "I said enter y or n, silly!" << endl;
- }
- } while ( z != 'y' || z != 'n' );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment