Is the output of the following code if the value of score is 100? Assume variables score and grade has been declared as in You may assume that score is input by user and grade has not been initilaized before the if statement. if(score >= 60) grade = 'D'; else if(score >= 70) grade = 'C'; else if(score >= 80) = 'B'; grade else if(score >= 90) grade = 'A'; 18 else grade 'U'; System.out.println(grade); %3D

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.7: Do While Loops
Problem 3E: (Misc. application) a. Write a program to reverse the digits of a positive integer number. For...
icon
Related questions
icon
Concept explainers
Question
What is the output of the following code if the value of score is 100? Assume variables score and grade has been declared as int and cha
You may assume that score is input by user and grade has not been initilaized before the if statement.
11
if(score >= 60)
grade = 'D';
else if(score >= 70)
%3D
15
grade = 'C';
else if(score >= 80)
grade
else if(score >= 90)
grade = 'A';
"B';
%3D
else
grade = 'U';
System.out.println(grade);
%3D
Transcribed Image Text:What is the output of the following code if the value of score is 100? Assume variables score and grade has been declared as int and cha You may assume that score is input by user and grade has not been initilaized before the if statement. 11 if(score >= 60) grade = 'D'; else if(score >= 70) %3D 15 grade = 'C'; else if(score >= 80) grade else if(score >= 90) grade = 'A'; "B'; %3D else grade = 'U'; System.out.println(grade); %3D
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr