Multiple Choice
A student's class average can be computed by dividing the number of marks they have earned by the number of marks possible.Assume the following variables have been declared as shown and given values elsewhere:
int marksEarned, marksPossible;
double classPercentage;
Which of the following statements will assign the correct percentage average to classPercentage? For example, if marksEarned is 725 and marksPossible is 1000, classPercentage should be assigned the value 72.5.
A) classPercentage = marksEarned / marksPossible * 100.0;
B) classPercentage = 100 * marksEarned / marksPossible;
C) classPercentage = (100.0 * marksEarned) / marksPossible;
D) classPercentage = (100.0 + marksEarned) / marksPossible;
Correct Answer:

Verified
Correct Answer:
Verified
Q74: What is the value of Math.pow(2, 3)?<br>A)5.0<br>B)6.0<br>C)8.0<br>D)9.0
Q75: Which one of the following is an
Q76: Which is a correct representation of the
Q77: What is the output of this code
Q78: Which option represents the best choice for
Q80: Which of the following statements about constants
Q81: Which one of the following statements can
Q82: What is wrong with the following code?<br>int
Q83: What is the output of the following
Q84: What will be printed by the statements