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?
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main(){
string month1, month2, month3;
cout << "Please enter the name of the 3 months\n";
// 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.
how to make this program for c++ visual studio 2015. Also, can I show your working...
Rainfall StatisticsWrite a modular program that analyzes a year's worth of rainfall data. In addition to main, the program should have a getData function that accepts the total rainfallfor each of 12 months from the user, and stores it in a double array. It should also have four value-returning functions that compute and return to main thetotalRainfall, averageRainfall, driestRainfall, and wettestMonth. These last two functions return the number of the month with the lowest and highest rainfall amounts,not the amount...
Write a Python program that allows the user to enter the total rainfall for each of 12 months into a list. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest rainfall amounts. Data: January: 8.9 inches February: 11.1 inches March: 13.4 inches April: 6.9 inches May: 8.7 inches June: 9.1 inches July: 15.9 inches August: 4.4 inches September: 3.1 inches October: 5.6 inches November: 7.8...
Write them in python IDLE *****
5. Average Rainfall
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 twelve
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,...
Write a program that stores the total amount of rain for each month in an array. Prompt the user for the values for each month to load the array. Display this information back to them in a nice format with the name of the month and the rainfall for that month. Display back the total rainfall for the year, the average monthly rainfall, the month with the most rain, the month with the least rain, the months with rainfall above...
Average Rainfall Design 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 twelve 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...
Design 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 iterte twelve times, onece for each month. Each itertion of the inner loop will ask the user for the inches of rainfall for tht month. After all iterations, the program should display the number of months, the...
qbasic is the programming language
Chapter 8 Do Programming Exercise 8-3 om page 414. Create a string array to hold the months of the year. Call it anything you want to just make sure it's a string array is at the end of the name, e.g. months). Create a DATA statement that holds the month names: DATA "jan","Feb", "Mar" etc. Next you'll need a FOR loop to READ the DATA into the array, Call a SUB to get the rainfall...
Your next programming assignment at the Research Center is to write a program that reads data from a file and produces a report of rainfall for that period of time. The program should read the starting month name from the data file, then read an ending month name, followed by reading in monthly rainfall amounts for each of the months from the starting month through the ending month. As it reads the monthly totals, it should sum (accumulate) the rainfall...
5. Create a java application that uses nested loops to collect data and calculate the average rainfall over a peniod of years First the program should 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, the program should display the number of months, the total...
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should prompt the user for the number of years. Be sure to ask for each months average rainfall for each year. The outer loop will iterate once for each year while the inner loop will iterate 12 times(one time per month) prompting for the months average rainfall on each iteration. Display the number of months, the total inches...