Question: 2.26 LAB: Math class and Integer division This program is designed to provide practice on using the Math class, Integer division. If we have a

 2.26 LAB: Math class and Integer division This program is designed

2.26 LAB: Math class and Integer division This program is designed to provide practice on using the Math class, Integer division. If we have a parking garage that can hold up to 200 cars, how can we find the average number of cars in the garage over a three day period? Create three integer variables: numCars1 (number of cars in the garage on day 1), numCars 2 (number of cars parked on day 2), numCars3 (number of cars parked on day 3). What is the average number of cars parked in the garage? Ex: If the input is: 179 199 155 the output should be: 178 Note: The true average is177.6666, but you can't have 6666 of a car, so we use integer division and the ceil method to get an average of 178. 378290 2408682x3zqy7 LAB ACTIVITY 2.26.1: LAB: Math class and Integer division 0/10 LabProgram.java Load default template... 1 import java.util.Scanner; 2 3 public class LabProgram { public static void main(String[] args) { 5 /* Type your code here. */ 6 } 7) 4 8

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!