Question: Integer gerbilCount is read from input. If gerbilCount is less than 1 4 , then output gerbilCount, followed by : Not enough gerbils. End

Integer gerbilCount is read from input. If gerbilCount is less than 14, then output gerbilCount, followed by ": Not enough gerbils". End the output with a newline.
Click here for examples
import java.util.Scanner;
public class GerbilData {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int gerbilcount;
gerbilcount =scnr*nextInt();
}
}
 Integer gerbilCount is read from input. If gerbilCount is less than

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!