Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions