Write a multi-way if-else statement that evaluates a persons weight on the following criteria:
A
weight less than 115 pounds, output: Eat 5 banana splits! A weight between 116 pounds and 130
pounds, output: Eat a banana split! A weight between 131 pounds and 200 pounds, output: Perfect!
A weight greater than 200 pounds, output: Plenty of banana splits have been consumed!
```
if(weight <= 115)
System.out.println("Eat 5 banana splits!");
else if(weight <= 130)
System.out.println("Eat a banana split!");
else if(weight <=200)
System.out.println("Perfect!");
else
System.out.println("Plenty of banana splits have been consumed!");
```
You might also like to view...
The fields and methods that belong in a class are known as the class's __________.
a. body b. definition c. members d. data
Which of the following types are not built into the C++ language:
a. bool b. real c. short d. int e. long f. double
The bounds property controls the ___________ .
a) size of the text b) location of a component c) size of a component d) Both b and c
?Read the following sentence and key the correct terminal punctuation mark in the blank.How does the defibrillator work _____
Fill in the blank(s) with the appropriate word(s).