Computer Science, asked by Prithwishkumarde, 1 month ago



In a competitive examination there were 200 questions. One person got 80% correct and the other got

72% correct. Write a program to calculate and display the number of correct answers each candidate got. ​

Answers

Answered by Anonymous
0

Let x be the number of correct answers and y be the number of wrong answers. Since Jayanti answered 120 questions therefore, x + y = 120 that is

x = 120-y... (1)

Also, it is given that one mark is awarded 1 for each correct answer while mark is 2

deducted for every wrong answer and Jayanti got 90 marks, therefore, x 0.5y = = 90.... (2)

Substituting the value of equation 1 in equation 2: 120 y 0.5y = 90

-1.5y = -30

y = 20

Therefore,

x = 120 20 = 100

Hence, she answered 100 questions correctly.

Similar questions