![hii4199](/avatars/27803.jpg)
hii4199
29.07.2020 •
Computers and Technology
Assuming that a user enters 68 as the score, what is the output of the following code snippet? int score = 68; if (score < 50) { System.out.println("F"); } else if (score >= 50 || score < 55) { System.out.println("D"); } else if (score >= 55 || score < 65) { System.out.println("C"); } else if (score >= 65 || score < 75) { System.out.println("B"); } else if (score >= 75 || score < 80) { System.out.println("B+"); } else { System.out.println("A"); } D C B A
Solved
Show answers
More tips
- F Food and Cooking Learn How to Make Ice Cream at Home - Step by Step Guide...
- H Health and Medicine When can it be said that a person has a normal pulse?...
- A Art and Culture When Will Eurovision 2011 Take Place?...
- S Style and Beauty How to Choose the Perfect Hair Straightener?...
- F Family and Home Why Having Pets at Home is Good for Your Health...
- H Health and Medicine How to perform artificial respiration?...
- H Health and Medicine 10 Tips for Avoiding Vitamin Deficiency...
- F Food and Cooking How to Properly Cook Buckwheat?...
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- L Leisure and Entertainment Carving: History and Techniques for Creating Vegetable and Fruit Decorations...
Answers on questions: Computers and Technology
- M Mathematics Are the two expressions equivalent 5(3x+8) 8x+8 when x=10...
- M Mathematics Convert 32 feet 6-1/4 inches (measured to the nearest 1/4 inch) to decimal feet. How many significant figures are there?...
- C Chemistry The ends of a bar magnet are called .. a. ends b. south c.poles north...
- M Mathematics Amath club had 4 members in its first year. it had 19 members in its fourth year and 29 members in its sixth year. assuming a constant rate of increase, how many members will the math...
Ответ:
D
Explanation:
Using if in this way will validate one by one, and finding a true value will not validate the rest of "else if"
score = 68
if (score < 50) --> print "F"
68 < 50 --> falseelse if (score >= 50 OR score < 55) --> print "D"
68 > = 50 TRUE (The OR operator displays a record if any of the conditions separated by OR is TRUE)As this condition is true the system will not validate the other conditions
Ответ: