in a competitive examination,there were 150 questions.one candidate got 80% correct and the other candidate 72% correct.write a program to calculate and display the correct answers each candidate got.
Answers
Answered by
11
Answer:
I)120 ii)108
Explanation:
- we know there are 150 questions out of which one candidate got 80% correct answer so the first candidate got total correct answer is equal to 80% of 150 i.e. 80 X 150 divided by 100 show the answer got is 120.
- the second candidate got 72% so total correct answers he have done is 72 X 150 divided by hundred. so the answer is he got is 108. hope it's help you.
Answered by
7
Explanation:
public class KboatCompetitiveExam
{
public static void main(String args[]) {
int totalQuestions = 150;
int c1 = (int)(80 / 100.0 * totalQuestions);
int c2 = (int)(72 / 100.0 * totalQuestions);
System.out.println("Correct Answers of Candidate 1 = " + c1);
System.out.println("Correct Answers of Candidate 2 = " + c2);
}
}
HOPE IT SEEMS TO BE USE FULL.
Similar questions
Science,
4 months ago
History,
4 months ago
English,
4 months ago
Social Sciences,
9 months ago
Math,
9 months ago
Math,
1 year ago
Physics,
1 year ago
Accountancy,
1 year ago