Reference no: EM131324994
Program 1
Write a program that reads and processes data about quarterly rainfall for one year. Your program should ask the user to enter rain fall amounts for each of the four quarters in the year. You must use a looping construct to read the input for one quarter at a time until all four quarters' data has been read. The program should output the name which quarter (i.e. Quarter 1, Quarter 2, Quarter 3, or Quarter 4) had the most rainfall, which quarter had the least rainfall, the average rainfall for the entire year, and the total rainfall for the entire year. All output should be displayed with meaningful descriptions.
Program 2
Modify program 1 so that it will handle multiple years of rainfall data. The user should be asked at runtime to supply the actual number of years they want to enter in the program for evaluation. In addition to the output specified in program 1 for each individual year, program 2 should output the year (i.e. Year 1, Year 2, etc.) with the most total rainfall and the year with the least total rainfall. All output should be displayed with meaningful descriptions. You are required to use a nested looping construct for this program.
Sample output: (Your program should work properly with all positive data)
How many year's rainfall amounts would you like to enter: 2
ÏÏ ÏEnter data for year 1
Ï Enter the rainfall for quarter 1: 4
Ï Enter the rainfall for quarter 2: 2
Ï Enter the rainfall for quarter 3: 8
Ï Enter the rainfall for quarter 4: 6
ÏÏÏ
ÏÏ Ï Quarter 3 had the most rainfall with 8.0 inches
ÏÏ Ï Quarter 2 had the least rainfall with 2.0 inches
ÏÏ Ï The total rainfall for year 1 was 20.0 inches
ÏÏ Ï The average quarterly rainfall for year 1 was 5.0 inches
ÏÏ Ï
ÏÏ ÏEnter data for year 2
Ï Enter the rainfall for quarter 1: 3.1
Ï Enter the rainfall for quarter 2: 9.1
Ï Enter the rainfall for quarter 3: 5.1
Ï Enter the rainfall for quarter 4: 1.1
ÏÏÏ
ÏÏ Ï Quarter 2 had the most rainfall with 9.1 inches
ÏÏ Ï Quarter 4 had the least rainfall with 1.1 inches
ÏÏ Ï The total rainfall for year 2 was 18.4 inches
ÏÏ Ï The average quarterly rainfall for year 2 was 4.6 inches
ÏÏÏ
Ï ÏYear 1 had the most rainfall with 20.0 inches
ÏÏ ÏYear 2 had the least rainfall with 18.4 inches(hint - This program will require nested loops. The outer loop determines the year and the inner loop determines the quarter within the year. If you are having trouble understanding nested loops be sure to watch the screen cast on nested loops, it is based on an application very similar to this problem.)
Differentiate a seizure from epilepsy
: Define a seizure. Differentiate a seizure from epilepsy. Which area of the brain is involved in seizures? How do certain neurotransmitters play a role in some seizures?
|
Rate of return on investments of this risk
: A company just paid an annual dividend of $0.82 per share, and this dividend is expected to remain constant in the future. What is one share worth today if you require a 12% rate of return on investments of this risk?
|
Domain of membrane protein
: How to define which domain of membrane protein is intracellular or extracellular domain?
|
Compute bowen''s accounting profits
: If Bowen worked for another farmer or a local manufacturer, his annual income would be about $30,000. Bowen can invest any funds that would be derived, if the farm were sold, to earn 10 percent annually. (Ignore taxes.)
|
Write a program that reads and processes data
: Write a program that reads and processes data about quarterly rainfall for one year. Your program should ask the user to enter rain fall amounts for each of the four quarters in the year.
|
What is the taxable-equivalent yield for an individual
: A company has just paid a quarterly dividend of $1.50 per share, which is expected to increase 1% every quarter into the future. The future dividends are an example of which type of cash flow stream? A municipal bond yields 5.1 percent. What is the t..
|
Determine the (pre-tax) economic profit for this venture
: Which of the costs for this firm are explicit and which are implicit?
|
Future of accounting information systems
: After spending the last seven weeks learning about AIS, you have now learned a lot. Now, after reading the article from IBM on "what we know now", highlight the future of accounting information system
|
Explain the specific information that you would communicate
: CIS107-Describe one strategy that you would use to ease the identified concerns of the group, and explain the specific information that you would communicate to them to achieve this goal.
|