Click here to Skip to main content
15,887,917 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Problem : Exam Efficiency

In an examination with multiple choice questions, the following is the exam question pattern.
X1 number of One mark questions, having negative score of -1 for answering wrong
X2 number of Two mark questions, having negative score of -1 and -2 for one or both options wrong
X3 number of Three mark questions, having negative score of -1, -2 and -3 for one, two or all three options wrong
Score Required to Pass the exam : Y
For 1,2 and 3 mark questions, 1,2 and 3 options must be selected. Simply put, once has to attempt to answer all questions against all options.
Identify the minimum accuracy rate required for each type of question to crack the exam.

Calculations must be done up to 11 precision and printing up to 2 digit precision with ceil value

Input Format:

First line contains number of one mark questions denoted by X1,
Second line contains number of two mark questions denoted by X2
Third line contains number of three mark questions denoted by X3
Fourth line contains number of marks required to pass the exam denoted by Y.

Output Format:

Minimum Accuracy rate required for one mark question is 80%
Minimum Accuracy rate required for Two mark question is 83.33%
Minimum Accuracy rate required for Three mark question is 90%


Note: - If the mark required to pass the exam can be achieved by attempting without attempting any particular type of question then show message similar to, One mark question need not be attempted, so no minimum accuracy rate applicable

See Example Test cases for better understanding.


Sample Input and Output

SNo. Input Output Explaination
1
20
30
30
120

One mark questions need not be attempted, so no minimum accuracy rate applicable.
Minimum Accuracy rate required for Two mark question is 58.33%
Minimum Accuracy rate required for Three mark question is 72.23%

If one got full marks in two marks question and three marks question then total accuracy can be 0 in one mark question

In same way it will be done for two marks and three marks question
2
20
30
30
170

Minimum Accuracy rate required for one mark question is 100%
Minimum Accuracy rate required for Two mark question is 100%
Minimum Accuracy rate required for Three mark question is 100%

If one got full marks in two marks question and three marks question then total accuracy should be 100% in one mark question to pass the exam.

In same way it will be done for two marks and three marks question

What I have tried:

i have tried using c language but am unable to solve
Posted
Updated 29-Jul-16 21:36pm
Comments
nv3 30-Jul-16 3:21am    
Things don't run this way here. We don't do you homework. At least you have to attempt to solve it yourself and show the code that you have arrived at. Then you may ask a question regarding a particular problem that you have run into.

1 solution

How do you compile it? Simple:
1) Read your homework question carefully, and think about what it is asking you to do.
2) Design a system that will implement the solution.
3) Code the system you designed
4) Compile the code
5) If it fails to compile, go back to (3) and make changes.
6) Test the compiled program against the question.
7) If it fails, go back to 1, 2, 3, and / or 4.
8) Repeat util it passes.

This is your homework: the "thinking part" at the beginning is part of the task!
 
Share this answer
 
Comments
Member 12661203 30-Jul-16 3:45am    
ineed the solution not the process
OriginalGriff 30-Jul-16 5:26am    
No, you need the process - "the solution" wouldn't teach you anything.
And if you rely on getting others to do your homework, you are going to fail the course when it comes to exams as you won;t have any idea how to do anything...
jeron1 30-Jul-16 11:29am    
Flip burgers for a living...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900