Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- cout<<"Hello! Lets Check your General Knowledge";
- cout<<"\nHere's Your Score: 0";
- cout<<"\nSo, Lets Start\n";
- int a,month,Score=0;
- cout<<"\nWho is the Prime Mininster of India?\n";
- cout<<"\n1. Narendra Singh Modi 2. Pranav Muhkarhyee\n\n";
- cout<<"Choose the Correct Option(1/2):\n";
- cin>>a;
- if(a==1){cout<<"\nCongratz thats the right answer";
- cout<<"\nYou got one point...+1\n\n";
- cout<<"Score: 1";
- }
- else{cout<<"Wrong Answer..\a";
- }
- cout<<"\nYour second question is..\n";
- cout<<"\nWhat is Month May's postion in numbers(1-12)?";
- cout<<"\n\nEnter the correct number:";
- cin>>month;
- switch(month){
- case 1:
- cout<<"Wrong Answer 1st Month is January\n";
- break;
- case 2:
- cout<<"Wrong Answer 2nd Month is February\n";
- break;
- case 3:
- cout<<"Wrong Answer 3rd Month is March\n";
- break;
- case 4:
- cout<<"Wrong Answer 4th Month is April\n";
- break;
- case 5:
- cout<<"Right Answer! 5th Month is May\n";
- if(a==1)cout<<"\nYour Score is: 2";
- else{cout<<"\nYour Score is: 1";
- }
- break;
- case 6:
- cout<<"Wrong Answer 6th Month is June\n";
- break;
- case 7:
- cout<<"Wrong Answer 7th Month is July\n";
- break;
- case 8:
- cout<<"Wrong Answer 8th Month is August\n";
- break;
- case 9:
- cout<<"Wrong Answer 9th Month is September\n";
- break;
- case 10:
- cout<<"Wrong Answer 10th Month is October\n";
- break;
- case 11:
- cout<<"Wrong Answer 11th Month is November\n";
- break;
- case 12:
- cout<<"Wrong Answer 12th Month is December\n";
- break;
- default:
- cout<<"\n\nPlease Enter a Number between 1 to 12..";
- break;
- }
- cout<<endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement