You would need to give a more detailed explanation of your problem. In order to provide a correct code, please provide the following details:
Once you provide these details, I will provide you a more correct code.
For time being, I am providing a sample code of a quiz game in C++.
CODE
================
#include<iostream>
using namespace std;
int main() {
int x,n;
x=0;
char choice[100],ch1;
cout<<"\n\n\t\t *************";
cout<<"\n\n\t\t * Quiz Game *";
cout<<"\n\n\t\t *************";
cout<<"\n\n\t\t====================================";
cout<<"\n\n\t\t= Developed By :Bhaumik Mevada =";
cout<<"\n\n\t\t====================================";
cout<<"\n\n";
cout<<"\n Please Enter Your Name : ";
cin>>choice;
cout<<"\n\n";
cout<<"\n\n\t\t Welcome "<<choice<<"\n";
cout<<"\n\n\t\t Loading Please wait........";
cout<<"\n\n\t\t 1) Start Quiz";
cout<<"\n\n\t\t 2) View Score";
cout<<"\n\n\t\t 3) Exit Quiz";
cout<<"\n\n Enter Your Choice :--> ";
cin>>n;
switch(n)
{
case 1:
cout<<"\n\n\n Note :Enter Answer in the a,b,c and d only...";
cout<<"\n\n\n";
cout<<"Which of the following type of class allows only one object of it tobe created ?";
cout<<"\n\n A.Virtual Class \n\n B.Abstract Class \n\n C.Singleton Class \n\n D.Friend Class";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='c')
{
x=x+1;
cout<<"\n\n Correct Answer....";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n\n";
cout<<"Which of the following is not a type of constructor ?";
cout<<"\n\n A.Copy Constructor \n\n B.Friend Constructor \n\n C.Default Constructor \n\n D.Parameterized Constructor";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='b')
{
x=x+1;
cout<<"\n\n Correct Answer....";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n\n";
cout<<"RunTime Polymorphism is achieved by___";
cout<<"\n\n A.Friend Function \n\n B.Operator Overloading \n\n C.Function Overloading \n\n D.Virtual Function";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='d')
{
x=x+1;
cout<<"\n\n Correct Answer...";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n\n";
cout<<"Which of the following cannot be used with the Keyword 'Virtual' ?";
cout<<"\n\n A.Constructor \n\n B.Member function \n\n C.Destructor \n\n D.Class";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='a')
{
x=x+1;
cout<<"\n\n Correct Answer.....";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n\n";
cout<<"Which of the following is not a type of inheritance ?";
cout<<"\n\n A.Multiple \n\n B.Distributive \n\n C.Multilevel \n\n D.Hierarchical";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='b')
{
x=x+1;
cout<<"\n\n Correct Answer...";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n\n";
cout<<"Which of the following is an invalid visibility label while inheriting a class";
cout<<"\n\n A.Public \n\n B.Private \n\n C.Friend \n\n D.Protected";
cout<<"\n\n Enter Your Select Answer : ";
cin>>ch1;
if(ch1=='c')
{
x=x+1;
cout<<"\n\n Correct Answer....";
}
else
cout<<"\n\n Sorry Wrong Answer....";
cout<<"\n\n Enter Your Choice :--> ";
cin>>n;
case 2:
if(x==50)
cout<<"\n\n Congratulation......You are extremly intelligent";
else if(x<=50)
cout<<"\n Total Score is : "<<x;
cout<<"\n\n Enter Your Choice :--> ";
cin>>n;
case 3:
return 0;
}
}
How to Write a program in c++ to compute the Quiz mark from 16 point to...
Problem 16. Write a program to prompt the user for a floating point number x and compute the following formula: Problem 18. Write a program fragment that uses nested for loops to produce the following output, making sure that the user input is between 3 and 42.
Write a C Program. Given a 50 x 5 matrix, consisting of 5 quiz grades of 50 students, find and display the fourth quiz grade of the student who got 25 from the third quiz, if any.
In C: Write a program that will compute and print a table of the factorials from 1 to 12. The program should define a function called fact to compute the factorial, use loops where appropriate, and produce the following output: 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 11 39916800 12 479001600
C++ code blocks Exercise#2: Quiz marks Write a program that generates quiz marks at random, between O and 10 inclusive, for a number (less than 50) of Your program should display the marks, class average, and how many students score students decided by the user. above class average. Sample input/output: nter class size: 15 uiz marks: 8 9 9 1 7 5 5 10 1 07 7 5 8 6 e class average is: 5.87 students scored above average
Write a C program to store the first name, the age and the exam mark of 5 students by using an array of structures. Print the information stored in the structure array on the screen
Write a C++ program to take two numbers as input from the user , compute the addition, subtraction, multiplication and division of these numbers and display the desired formatted results.
using C language Programming Question 1 Write a C program that takes students marks from a user, one by one until -1" is entered, which would indicate that no other marks are available, and the program terminates. For each mark the program will decide the student grade as: Fail, if mark < 60 • D. if 60<= mark <=70 • C. if 70<=mark <=80 • B. if 80c= mark <=90 • A. if 90cmark <=100 -T -- E - 15203...
how to write a matlab program for the following question? Q: 1.Topic:"Automatic Quiz Grading" 2.The concept is to calculate the student's score in the way of computer scoring. 3.Student's answer (file name: a2.dat) 4.Standard answer (file name: a1.dat) 5. The number of questions are 20 6. all pairs Get +1 point, deduct one option for 1 point 7.calculate the student's grade
C++ Lab Quiz #3-B Upper Case Letters Write a main() program that reads a string and calls the function int countUpper(string) which counts and returns the number of upper case letters in the string. The main) prints the result Sample inputs/outputs: nter a string: This is a C++ quIz numBer 4 This is a C++ quIz numBer 4" has 5 upper letters
1=Write a program in C to get 16-bit data from Port-D and send it to ports Port-B 2-Write instructions in C to toggle both bits RD7 and RD0 continuously 3-Write instructions in C to get the status of RB2 and put it on RB0 4-Code a simple program in C to send 3499H to Port B and Port D.