Ask Question

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

+2
Answers (1)
  1. 4 July, 12:33
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers