Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using JAVA, write a nested loops program that collects, calculates, and displays the average lung cancer rate over a period of years. The user will

Using JAVA, write a nested loops program that collects, calculates, and displays the average lung cancer rate over a period of years. The user will be asked to enter the number of years.The outer loop will iterate once for every year. The inner loop will iterate 12 times, once for each month. Each iteration of the inner loop will ask the user for the number of cancer cases for that month. After all iterations, the program should display the number of months, the total number of lung cancer cases, and the average lung cancer cases per month for the entire period. Input Validation: Do not allow negative numbers for the monthly lung cancer cases.

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

Step: 3

blur-text-image

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago