Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <string>
- using namespace std;
- int main() {
- string user, pass, apple, passi;
- int score = 0, q1, con1=0, q2, con2=0, q3, con3=0, q4, con4=0, q5, con5=0, q6, con6=0, q7, con7=0, q8, con8=0, q9, con9=0, q10, con10=0;
- cout<< "Username: "; // Username and Password Checker
- cin>> apple;
- cout<< "Password: ";
- cin>> passi;
- user="ADMIN";
- pass="admin";
- while (user != apple || pass!=passi) {
- cout << "Invalid Username and Password"<<endl;
- cout << "Username: ";
- cin >> apple;
- cout << "Password: ";
- cin >> passi;
- }
- cout << "\n-------------------------\n"
- << "WELCOME USER TO THE TF2 QUIZ\n"
- << "-------------------------\n";
- do { // Question 1
- cout << "\nQuestion 1" << endl
- << "Most Mann Co. Supply Crates list the items that are in them. At the end of the list, it says or an Exceedingly Rare Special Item! What is the exceedingly rare special item?\n"
- << "\t1)Unusual Taunt\n"
- << "\t2)Ususual Hat\n"
- << "\t3)Usuual Weapon Skin\n"
- << "\t4)Spooky Spellbook\n";
- cin >> q1;
- if (q1 == 2 ) { // Checks if answer is correct or incorrect
- cout << "Correct\n";
- score= score + 10;
- con1++; }
- else if (q1 == 1 || q1 == 3 || q1 == 4) {
- cout << "Incorrect.\n";
- con1++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con1==0); //Each question is the same except with dif Answ
- do { // Question 2
- cout << "\nQuestion 2" << endl
- << "The Two Cities Update introduced two new Mann vs. Machine maps. What are they?\n"
- << "\t1)Hanamora and New Mech\n"
- << "\t2)Saxton and Hale\n"
- << "\t3)2Fort and Viaduct\n"
- << "\t4)Rottenburg and Mannhattan\n";
- cin >> q2;
- if (q2 == 4 ) {
- cout << "Correct.\n";
- score= score + 10;
- con2++; }
- else if (q2 == 1 || q2 == 3 || q2 == 2) {
- cout << "Incorrect.\n";
- con2++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con2==0);
- do { // Question 3
- cout << "\nQuestion 3" << endl
- << "The Medic's signature ability is fierce and unstoppable. By using the alternate fire on the Medi Gun, the Medic can activate invulnerability for himself and his heal target. This invulnerability is known in game as a what?\n"
- << "\t1)invulnerability\n"
- << "\t2)Ubercharge\n"
- << "\t3)The Good Stuff\n"
- << "\t4)Bulletproof\n";
- cin >> q3;
- if (q3 == 2 ) {
- cout << "Correct.\n";
- score= score + 10;
- con3++; }
- else if (q3 == 1 || q3 == 3 || q3 == 4) {
- cout << "Incorrect.\n";
- con3++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con3==0);
- do { // Question 4
- cout << "\nQuestion 4" << endl
- << "How many classes are in Team Fortress 2?\n"
- << "\t1)Nine\n"
- << "\t2)Ten\n"
- << "\t3)Eight\n"
- << "\t4)Eleven\n";
- cin >> q4;
- if (q4 == 1 ) {
- cout << "Correct.\n";
- score= score + 10;
- con4++; }
- else if (q4 == 2 || q4 == 3 || q4 == 4) {
- cout << "Incorrect.\n";
- con4++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con4==0);
- do { // Question 5
- cout << "\nQuestion 5" << endl
- << "The Soldier can shoot a Rocket beneath his feet to propel himself into the air at the cost of some health, what is the weapon that allows him to rocket jump at the cost of no health?\n"
- << "\t1)The No Damage Launcher\n"
- << "\t2)The Worst Lanucher\n"
- << "\t3)The Rocket Jumper\n"
- << "\t4)Gotta Jump\n";
- cin >> q5;
- if (q5 == 3 ) {
- cout << "Correct.\n";
- score= score + 10;
- con5++; }
- else if (q5 == 2 || q5 == 1 || q5 == 4) {
- cout << "Incorrect.\n";
- con5++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con5==0);
- do { // Question 6
- cout << "\nQuestion 6" << endl
- << "What do Strange quality weapons do?\n"
- << "\t1)Counts total amount of kills\n"
- << "\t2)Adds a Killstreak factor\n"
- << "\t3)Adds a strange effect\n"
- << "\t4)Allows customization to the weapon\n";
- cin >> q6;
- if (q6 == 1 ) {
- cout << "Correct.\n";
- score= score + 10;
- con6++; }
- else if (q6 == 2 || q6 == 3 || q6 == 4) {
- cout << "Incorrect.\n";
- con6++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con6==0);
- do { // Question 7
- cout << "\nQuestion 7" << endl
- << "An alternate to his standard Shotgun, The Frontier Justice can bank guaranteed critical hits from sentry gun kills. What must happen before the Engineer can use them?\n"
- << "\t1)Incresing of the Level of Sentry\n"
- << "\t2)Amount of Ammo from dispensers decreases\n"
- << "\t3)Number of Teleports increases\n"
- << "\t4)Destroying the Sentry\n";
- cin >> q7;
- if (q7 == 4 ) {
- cout << "Correct.\n";
- score= score + 10;
- con7++; }
- else if (q7 == 2 || q7 == 3 || q7 == 1) {
- cout << "Incorrect.\n";
- con7++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con7==0);
- do { // Question 8
- cout << "\nQuestion 8" << endl
- << "According to the developer commentary, what is Valve co -founder, Gabe Newell's favourite class?\n"
- << "\t1)Solider\n"
- << "\t2)Heavy\n"
- << "\t3)Spy\n"
- << "\t4)Demoman\n";
- cin >> q8;
- if (q8 == 3 ) {
- cout << "Correct.\n";
- score= score + 10;
- con8++; }
- else if (q8 == 2 || q8 == 4 || q8 == 1) {
- cout << "Incorrect.\n";
- con8++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con8==0);
- do { // Question 9
- cout << "\nQuestion 9" << endl
- << "When the Sandman is equipped, how much health does the Scout have?\n"
- << "\t1)100\n"
- << "\t2)95\n"
- << "\t3)115\n"
- << "\t4)110\n";
- cin >> q9;
- if (q9 == 4 ) {
- cout << "Correct.\n";
- score= score + 10;
- con9++; }
- else if (q9 == 2 || q9 == 3 || q9 == 1) {
- cout << "Incorrect.\n";
- con9++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con9==0);
- do { // Question 10
- cout << "\nQuestion 10" << endl
- << "The Pyro's Flame Thrower has a compression blast ability activated by secondary fire. It extinguishes teammates, deflects projectiles and pushes enemies. One flame thrower does not have this ability. Which one?\n"
- << "\t1)Regular Flamethrower\n"
- << "\t2)Phlogistinator\n"
- << "\t3)The Rainblower\n"
- << "\t4)Degreaser\n";
- cin >> q10;
- if (q10 == 2 ) {
- cout << "Correct.\n";
- score= score + 10;
- con10++; }
- else if (q10 == 4 || q10 == 3 || q10 == 1) {
- cout << "Incorrect.\n";
- con10++; }
- else
- cout << "Not a Vaild Answer";
- }
- while (con10==0);
- cout << "\nThank you for Taking the Quiz. You got a " << score<< endl; // Shows score
- switch (score) { // Gives message Depending on Grade
- case 100: cout << "You got a Perfect Score. Outstanding!\n";
- break;
- case 90: cout << "Great Job! You got an A.\n";
- break;
- case 80: cout << "Good Job. You got a B.\n";
- break;
- case 70: cout << "Okay. You got a C.\n";
- break;
- default:
- cout << "Sorry, You have failed. Better Luck Next Time.\n"; }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement