Answered step by step
Verified Expert Solution
Question
1 Approved Answer
***************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ******
***************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ********************************USGIN C++ AS LANGUAGE ******
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate 12 times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. Input Validation: Do not accept a number less than 1 for the number of years. Do not accept negative numbers for the montbly rainfall. Exercise \#5 Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. A loop should display the size of the population for each day. Input Validation: Do not accept a number less than 2 for the starting size of the population. Do not accept a negative number for average daily population increase. Do not accept a number less than 1 for the number of days they will multiply
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started