Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how to make this program for c++ visual studio 2015. Also, can I show your worki

ID: 3789835 • Letter: H

Question

how to make this program for c++ visual studio 2015. Also, can I show your working and program. Also, Can you have notice for pseudo code?

For the first problem, please implement Problem 4 on page 142 (p 143, 7E) of the text. A scan of the problem is provided below. This problem asks you to calculate 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 inches) that fell each month. The program should then display a report as follows: The average rainfall for June July, and August was 6.72 inches. Note that the rainfall average is printed to two decimal places this time. Here we are asking the user for string data, not just numeric input. To accomplish that in a C++ program, we can use the string class. Simply declare three variables of type string to receive the month name input from cin. Don't forget to include the header file. 4. Average Rainfall 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 inches) that fell each month. The program should display a mes sage similar to the following: The average rainfall for June, July, and August is 6.72 inches.

Explanation / Answer

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

int main(){
string month1, month2, month3;

cout << "Please enter the name of the 3 months ";
// take the 3 month name as input from console
cin >> month1 >> month2 >> month3;

double totalRain = 0;

cout << "Please enter the rain fall for each month" << endl;
// take amount of rain for those 3 months
for(int i = 0;i < 3; ++i){
double rain;
cin >> rain;
totalRain += rain;
}

// divide by 3 to get the average
totalRain /= 3;

// now print it
cout << "The average rainfall for "<<month1 << ", " << month2 << ",and " << month3 << " is ";
cout << fixed << setprecision(2) << totalRain;
cout << " inches." << endl;
system("pause"); // to see the output in visual studio
return 0;
}

Please enter the name of the 3 months
June
July
September
Please enter the rain fall for each month
2.34
345.555
98.999
The average rainfall for June, July,and September is 148.96 inches.