Ask Question
4 June, 13:21

Suppose that the variables grade1, grade2, and grade3 are declared as follows:

int grade1 = 88;

int grade2 = 92;

int grade3 = 83;

Which of these expressions correctly calculates the average of grade1, grade2, and grade3?

A. (grade1 + grade2 + grade3) / 3

B. (grade1 + grade2 + grade3) / 3.0

C. (double) ((grade1 + grade2 + grade3) / 3)

D. (double) grade1 + grade2 + grade3 / 3.0

E. (double) grade1 + (double) grade2 + (double) grade3 / 3.0

+4
Answers (1)
  1. 4 June, 13:45
    0
    A; you have to add the grades to have the total and then divide by 3 because there are 3 variables.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose that the variables grade1, grade2, and grade3 are declared as follows: int grade1 = 88; int grade2 = 92; int grade3 = 83; Which of ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers