Create a simple c++ console GUI application, any kind of quiz with multiple choice answers.
#include<iostream.h>
#include<conio.h>
#include<string.h>
int main(){
//array of question
char que[5][100]={"What is the Capital of India?","What is the name
of the President of USA?","What is the name of the Prime Minister
of India?","Who invented the law of motions?","Who is the CEO of
microsoft?"};
//array of corresponding answers to the questions
char ans[5]={'D','B','A','C','D'};
//options for each question
char options[5][4][50]={"A. Mumbai","B. Ahmedabad","C. Chennai","D.
Delhi","A. Barak Obama","B. Donald Trump","C. Hillary","D.
Steve","A. Narendra Modi","B. Manmohansinh","C. Pranav
Mukherjee","D. Morarjee Desai","A. Einstein","B. Galaliyo","C.
Isacc Newton","D. Rutherford","A. Steve Jobs","B. Tim Cook","C.
Larry Page","D. Bill Gates"};
//answer enterd by the user
char response[5];
//final score
int score=0;
clrscr();
for(int i=0;i<5;i++)
{
//print question
cout<<que[i]<<endl;
//print 4 options
cout<<options[i][0]<<"\t"<<options[i][1]<<endl;
cout<<options[i][2]<<"\t"<<options[i][3]<<endl;
//read response from user
response[i]=getch();
}
for(int i=0;i<5;i++){
//match user response with correct answer
//if correct the increment the score.
if(ans[i]==response[i])
score++;
}
//print the score.
cout<<"Your Result is: "<<score;
getch();
return 0;
}
Output:
Create a simple c++ console GUI application, any kind of quiz with multiple choice answers.
answer in c# console application. File l/O Create a Person class (firstName, lastName, phoneNumber, gender (Use radioButtons for gender in the GUI) ) Create a List<Person> Create a GUI that will collect the Person information from the user and have 3 buttons: Add, Display, Read. Add button Add the just created person to List<Person>, and append to a text file Display button > print out all persons currently in the List<Person> in a label in a visually attractive way Read...
Can you create a simple True/False or simple Multiple Choice question that relates to either acceleration or velocity and provide the answer to the question created. Can not be from a textbook. Needs to be one of a kind.
Create a GUI or JavaFX application with two buttons and two labels. Add an Image Icon of your choice to the first button and the first label.
(Must be in C#) (Console will be my choice) Create a program called NarwhalCalc that will be used to compute a narwhal's weight in tons based on its length in feet. Your program must use a method to do this and you must write this method. Your method must be called FeetToTons and the method must accept a parameter called feet (type double). The method should then use the formula shown below to calculate the narwhal's weight, then RETURN (not...
Create a new Netbeans project application from scratch called MyAge. Create a GUI that accepts user input. The final script should be able to calculate your age when your date of birth is entered. Include a simple try and catch for arithmetic errors.
On a 10 question multiple choice English 12 quiz, 3 answers are A, 2 answers are B, 2 answers are C, 1 answer is D, and 2 answers are E. How many different answer keys are possible?
Using Java develop a GUI based simple quiz game. The questions and answers of the game will be stored in a text file (i.e. our database). On the first page the users will be provided with some instructions on how to play the game and next button to go to the next page. On the next page will be a start button to either start the game and an exit button to exit the game. Once the game starts there...
Travel Expenses Create a GUI in C# Visual Studios application that calculates and displays the total travel expenses of a business person on a trip. Here is the information that the user must provide: • Number of days on the trip • Amount of airfare, if any • Amount of car rental fees, if any • Number of miles driven, if a private vehicle was used • Amount of parking fees, if any • Amount of taxi charges, if any...
A quiz consists of 6 multiple-choice questions. Each question has 4 possible answers. A student is unprepared, and he has no choice but to guess answers completely at random. He passes the quiz if he gets at least 3 questions correctly. What is the probability that he will pass?
a multiple choice quiz consists of 20 questions, each of which has five possible answers of which only one is correct. A student passes the quiz if twelve or more correct answers are obtained. what is the probability of passing the quiz if on each question, a student can eliminate two incorrect answers and then guess between the remaining three? (answer format _._ _ _ _ _ _)