Write a program that calculates the average rainfall

Assignment Help C/C++ Programming
Reference no: EM13325615

Question 1
Write a program that can be used as a math tutor. The program should display two random numbers between 1 and 99 to be added, such as
20
+ 33
After the student has entered an answer and pressed the [Enter] key, the program should display the correct answer so the student can see if his/her answer is correct.

Question 2

Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in millimeters) that fell each month. The program should display a message similar to the following:

The average rainfall for June, July, and August is 6.72 millimeter.

Question 3

Modify the program you wrote for Question 2 (Average Rainfall) so it reads its input from a file instead of the keyboard.

Question 4

Program 1: Write a program that asks the user to enter five floating-point numbers. The program should create a file and save all five numbers to the file.

Program 2• The program should open the file created in Program 1 and ask the user to enter another five floating-points numbers and save all five numbers to the file, calculate the average of all ten numbers in the file and finally display the average and save the average to the file.

Reference no: EM13325615

Questions Cloud

Display the average and save the average to the file : Write a program that asks the user to enter five floating-point numbers. The program should create a file and save all five numbers to the file.
Calculate the force she must exert : When landing after a spectacular somersault, a 40.0 kg gymnast decelerates by pushing straight down on the mat. Calculate the force she must exert
Find out the energy of 1.20mol of photons : Determine the energy of 1.20mol of photons for each of the following kinds of light. (Assume three significant figures.) infrared radiation (1480nm) visible light (520nm) ultraviolet radiation (130nm)
What about the concession stand inside the theater : If a local movie theater sells tickets at different prices (senior citizens versus young people, matinee versus evening prices) is the local movie theater a monopoly? What about the concession stand inside the theater?
Write a program that calculates the average rainfall : Write a program that asks the user to enter five floating-point numbers. The program should create a file and save all five numbers to the file.
What is the cost-minimizing input mix for producing 4 units : If the wage rate is $30 per hour and the rental rate on Capital is $10 per hour, what is the cost-minimizing input mix for producing 4 units of output?
Case study - forensic accountants: fraud busters : Exactly what forensic accountants are. People who work in this growing field investigate such white-collar crimes as business fraud, improper financial reporting, and illegal investment schemes.
How to evaluate the ph at the points in the titration : Calculate the pH at the points in the titration of 40.00 mL of 0.425 M NH3 for the reaction below. NH3(aq) + HNO3  NH4+(aq) + NO3?(aq) For NH3, Kb = 1.8x10-5.
Who is pilotimos : Who is Pilotimos?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Need a prg that lets user enter total rainfal

Need a prg that lets user enter total rainfall for each of 12 months into an array of doubles,prg should then calculate and display total rainfall for year,the average monthly rainfall, and the months with highest and lowest amounts

  Using array subscript notation

Using array subscript notation, base/offset notation with the array name as the pointer, array notation with  vPtr , and pointer/offset notation with  vPtr , add 3 to the value in the 3 rd element and display that number. (Do not modify the value in ..

  Functions to make a main program

write the required functions to make a main program that is already written

  The actual solution of the equation shall be done

The actual solution of the equation shall be done by a function named equSolver(), which takes three coefficients as parameters and returns a structure of three fields: two roots (if they exist) and a boolean indicator, whether the roots do exist.

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

  Returns a count of the steps through the sort

Please write a c++ implimentation that returns a count of the steps through the sort. (do not worry about updating count, I will rewrite that segemnt. I need help with writing the shell sort.

  Destroy sauron''s ring by throwing it into the volcano

In order to destroy Sauron's ring by throwing it into the volcano Mt. Doom in the heart of Mordor, the hobbits have traveled a long way from their home in the Shire.

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Discuss the differences concerning how a program would acces

Discuss the differences concerning how a program would access the members of objects that have been declared as an array of objects

  Write test program to call function several times for gcd

Greatest common divisor of two integers is largest integer which will evenly divide both integers. Implement this function in assembly language and write test program which calls function several times, passing it different values.

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Wave steepness is the ratio of wave height

Wave steepness is the ratio of wave height (WH) to wave length(WL) and is an indicator of wave stability. When wave steepness exceeds a 1/7 ratio; the wave becomes unstable and begins to break. Assume a data file exits with the following header

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd