Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- int b;
- int c;
- int d;
- int e;
- int f;
- int g;
- int aa;
- int bb;
- int cc;
- int dd;
- int ee;
- int ff;
- int gg;
- int sum;
- cout << "Welcome to the Basic Mathematics Quiz!" << endl;
- cout << "This quiz will test you on your Addition, Subtraction, Multiplication, and Division skills." << endl;
- cout << endl;
- cout << "Let's begin!" << endl;
- cout << endl;
- cout << "What is 2 + 2?" << endl;
- cin >> a;
- if(a==4){
- cout << "Correct. Next problem..." << endl;
- aa = 1;
- }
- if (a!=4){
- cout << "Incorrect. Next problem..." << endl;
- aa = 0;
- }
- cout << endl;
- cout << "What is 10 - 5?" << endl;
- cin >> b;
- if (b==5){
- cout << "Correct. Next problem..." << endl;
- bb = 1;
- }
- if (b!=5){
- cout << "Incorrect. Next problem..." << endl;
- bb = 0;
- }
- cout << endl;
- cout << "What is 15 * 2?" << endl;
- cin >> c;
- if (c==30){
- cout << "Correct. Next problem..." << endl;
- cc = 1;
- }
- if (c!=30){
- cout << "Incorrect. Next problem..." << endl;
- cc = 0;
- }
- cout << endl;
- cout << "What is 50 / 25?" << endl;
- cin >> d;
- if (d==2){
- cout << "Correct. Next problem..." << endl;
- dd = 1;
- }
- if (d!=2){
- cout << "Incorrect. Next problem..." << endl;
- dd = 0;
- }
- cout << endl;
- cout << "Using the order of operations, what is 5 + 10 * 5 - 10?" << endl;
- cin >> e;
- if (e==45){
- cout << "Correct. Next problem..." << endl;
- ee = 1;
- }
- if (e!=45){
- cout << "Incorrect. Next problem..." << endl;
- ee = 0;
- }
- cout << endl;
- cout << "Using the order of operations, what is 2 / 10 * 5 + 15?" << endl;
- cin >> f;
- if (f==40){
- cout << "Correct. Next problem..." << endl;
- ff = 1;
- }
- if (f!=40){
- cout << "Incorrect. Next problem..." << endl;
- ff = 0;
- }
- cout << endl;
- cout << "Using the order of operations, what is 10 * 10 + 100 / 2 - 50?" << endl;
- cin >> g;
- if (g==100){
- cout << "Correct. Next problem..." << endl;
- gg = 1;
- }
- if (g!=100){
- cout << "Incorrect. Next problem..." << endl;
- gg = 0;
- }
- cout << endl;
- cout << "Test Complete!" << endl;
- if (aa + bb + cc + dd + ee + ff + gg == 7){
- cout << "You made a 7/7! " << 100/7*7 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 6){
- cout << "You made a 6/7! " << 100/7*6 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 5){
- cout << "You made a 5/7! " << 100/7*5 << "$ Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 4){
- cout << "You made a 4/7! " << 100/7*4 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 3){
- cout << "You made a 3/7! " << 100/7*3 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 2){
- cout << "You made a 2/7! " << 100/7*2 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 1){
- cout << "You made a 1/7! " << 100/7*1 << "% Score!" << endl;
- }
- if (aa + bb + cc + dd + ee + ff + gg == 0){
- cout << "You made a 0/7! " << 100/7*0 << "% Score!" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment