subject
Computers and Technology, 25.12.2020 17:30 mfin11

Consider the following code segments, which are each intended to convert grades from a 100-point scale to a 4 point scale and print the result. A grade of 90 or above should yield a 4.0, a grade of 80 to 89 should yield a 3.0, grade of 70 to 79 should yield a 20, and any grade lower than 70 should yield a 0.0 Assume that grade is an int variable that has been properly declared and initialized Code Segmenti double points = 0.0; ir (grade > 89) points 4.0; else if (grade > 79) points + 3.0; else if (grade > 69) points += 2.0; else points + 0.0; System. out. println (points); Code Segment II double points - 0.0; if (grade > 89) points + 4.0; if (grade > 79) grade 3.0; if (grade > 69) points - 2.0; if (grade points + 0.01 System. out. println (points); Which of the following statements correctly compares the values printed by the two methods? A. The two code segments print the same value only when grade is below 80. B. The two code segments print the same value only when grade is 90 or above or grade is below 80. C. The two code segments print the same value only when grade is 90 or above. D. Both code segments print the same value for all possible values of grade E. The two code segments print different values for all possible values of grade.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:10, MadiAbbott798
How does access indicates that a filter has been applied to a specific column
Answers: 1
image
Computers and Technology, 23.06.2019 11:20, 1tzM3
Http is the protocol that governs communications between web servers and web clients (i. e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, webbjalia04
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
image
Computers and Technology, 25.06.2019 07:50, demilasyone01
In addition to the four primary computer operations, today's computers typically also perform functions.
Answers: 1
You know the right answer?
Consider the following code segments, which are each intended to convert grades from a 100-point sca...

Questions in other subjects:

Konu
Mathematics, 28.08.2021 01:20
Konu
Mathematics, 28.08.2021 01:30