subject

Identify the logic error in the code below. The code is supposed to display a single message “child”, “adult” or “senior” for any value of age: if (age < 18) {
System. out. println("child");
} else if (age >= 18) {
System. out. println("adult");
} else if (age > 65) {
System. out. println("senior");
}
Question 1 options:

a)

no message for age = 65

b)

too many messages for age = 18

c)

no message for age < 65

d)

message “senior” will never be displayed

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
What is one reason why indoor air pollution has become an increasing problem.
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
question
Computers and Technology, 24.06.2019 11:40
100 pts. first person gets brainliest
Answers: 2
You know the right answer?
Identify the logic error in the code below. The code is supposed to display a single message “child”...
Questions
question
Mathematics, 05.05.2020 11:54