What is the output of this code snippet?
Double average;
Int grade1 = 87;
Int grade2 = 94;
// System.out.print("The average is " + (grade1 + grade2) / 2.0) ;
System.out.print("The average is " + average) ;
A) Unpredictable result
B) The average is 91.5
C) The average is 91.5 The average is 91.5
D) The average is 91.5 The average is 0.0
Correct Answer:
Verified
Q19: Which statement is true?
A)Variables cannot be assigned
Q59: What is the output of the following
Q60: What is the output of the following
Q61: What is the output of the following
Q63: What does the following statement sequence print?
Final
Q66: What does the following statement sequence print
Q67: What is the output of the following
Q92: The problem solving process emphasizes a "first,
Q94: At what point in the problem-solving process
Q98: What is the output of the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents