Question: Integer numFish is read from input representing the number of fish per tank a fish hatchery has. The fish hatchery has 2 4 tank .

Integer numFish is read from input representing the number of fish per tank a fish hatchery has. The fish hatchery has 24 tank. Assign integer totalFish with the total number of fish in the hatchery.
Ex: If the input is 7, then the output is:
168
public class FishData {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int numFish;
int totalFish;
numFish = scnr.nextInt();
System.out.println(totalFish);
}
}
can u complete this code

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 Programming Questions!