Question: please help me in javaAssume that bears weigh 4 9 7 pounds each, llamas weigh 2 5 9 pounds each, and tigers weigh 4 9
please help me in javaAssume that bears weigh pounds each, llamas weigh pounds each, and tigers weigh pounds each. Given variables
numBears, numLlamas, and numTigers read from input, compute the average weight of all the bears, llamas, and tigers, and
assign averageWeight with the result.
Ex: If the input is then the output is:
Average weight:
import java.util.Scanner;
public class Averageweightweight
public static void mainString args
Scanner scnr new Scanner
System.in;
int bearWeight ;
int llamaWeight ;
int tigerWeight ;
int numBears;
int numLlamas;
int numTigers;
int averageWeight;
int sumWeight;
numBears scnr nextInt ;
numLlamas scnr nextInt ;
numTigers scnr nextInt ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
