Ask Question
30 March, 14:43

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. 30 March, 17:19
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers