Solved

A Student's Class Average Can Be Computed by Dividing the Number

Question 79

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents