1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksju [112]
3 years ago
10

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 message similar to the following: The average rainfall for June, July, and August is 6.72 inches.
Computers and Technology
1 answer:
sergeinik [125]3 years ago
4 0

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // string array

   string m[3];

   // array to store rainfall

   double rainfall[3];

   // variables

   double avg_rainfall,sum=0;

   

   for(int i=0;i<3;i++)

   {

       cout<<"Enter name of month "<<i+1<<" :";

       // read month name

       cin>>m[i];

       cout<<"Enter rainfall (inches)  in month "<<i+1<<" :";

       // read rainfall

       cin>>rainfall[i];

       // sum of rainfall

       sum+=rainfall[i];

   }

   // Average rainfall

   avg_rainfall=sum/3;

   // print Average rainfall

   cout<<"Average rainfall for "<<m[0]<<","<<m[1]<<","<<m[2]<<" is "<<avg_rainfall<<" inches."<<endl;

return 0;

}

Explanation:

Create string array "m" to store name of month and double array "rainfall" to store rainfall. Read name of 3 months and rainfall in that month.Find the sum of all the rainfall  and the average rainfall.Print the average rainfall of 3 months.

Output:

Enter rainfall (inches)  in month 2 :45                                                                                    

Enter name of month 3 :july                                                                                                

Enter rainfall (inches)  in month 3 :43                                                                                    

Average rainfall for may,june,july is 42.6667 inches.

You might be interested in
Which of the following is NOT true about a flow chart?
SCORPION-xisa [38]
I think the answer is A
4 0
3 years ago
What is the primary difference among a domain model, an analysis model, and a design model for the same project?
Aleks04 [339]

Answer:

The design model is the description of the model to be implemented, the analysis model is the model that links the design and the system or domain model while the domain model is the entire software implementation.

Explanation:

The domain model is the conceptual aspect of software engineering that comprises operational and data features. The analysis model is the schematic description of the system that links the design model to the system domain. The design model is also known as the object model as it shows an abstract representation of the implementation. It helps to test the quality of the software been developed.

8 0
2 years ago
Similarities between human and computer​
Zielflug [23.3K]

Answer: Both have a center for knowledge; motherboard and brain. Both have a way of translating messages to an action. Both have a way of creating and sending messages to different parts of the system.

5 0
3 years ago
2) List three (3) negative impact of Technology on society
Nataly [62]

Answer:

1. social media and mobile devices may lead to psychological.

2. They may contribute to more serious health conditions such as depression.

3. The overuse of technology may have a more significant impact on developing children and teenagers.

Explanation:

may this help you have a good day

5 0
3 years ago
A __________ network is good for connecting computers over boundaries. A)campus area
zmey [24]
I believe the answer is D)system area <span />
8 0
3 years ago
Other questions:
  • What is the equivalent of film speed in digital cameras?
    6·2 answers
  • ___ are controls through which a user can enter input data in a gui application. answer
    10·1 answer
  • The steps for moving data from one cell to another are _____.
    14·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • Which tables and fields would you access to determine which book titles have been purchased by a customer and when the order shi
    15·1 answer
  • Which code will allow Joe to print Coding is fun. on the screen? print("Coding is fun.") print(Coding is fun.) print = (Coding i
    10·2 answers
  • DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
    12·1 answer
  • . Explain and demonstrate the functionality of timer devices in an embedded system[
    9·1 answer
  • Blood Alcohol Level (BAL) is the ratio between the alcohol consumed and the blood in the body. A. True B. False
    12·2 answers
  • What is the suffix of hollow?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!