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
kari74 [83]
3 years ago
9

Create an array to hold the rainfall values. Create a 2nd parallel array (as a constant) to hold the abbreviated names of the mo

nths. I created my arrays to be 1 element bigger than needed, and then disregarded element [0] (so that my months went from [1] = "Jan" to [12] = "Dec").
Computers and Technology
1 answer:
Zarrin [17]3 years ago
4 0

Answer:

#include <stdio.h>

int main()

{

//variable declaration

int low, high;

float lowRain, highRain, total, avg;

 

//array declaration

float rainfall[13];

char monthName[13][10] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

//get user input

for(int i=1; i<=12; i++)

{

printf("Enter the rainfall (in inches) for %s: ", monthName[i]);

scanf("%f", &rainfall[i]);

}

 

//display the monthly rainfall

printf("\nThe rainfall that was entered was:\n");

for(int i = 1; i<=6; i++)

printf("%s ", monthName[i]);

printf("\n");

for(int i = 1; i<=6; i++)

printf("%.1f ", rainfall[i]);

printf("\n");

for(int i = 7; i<=12; i++)

printf("%s ", monthName[i]);

printf("\n");

for(int i = 7; i<=12; i++)

printf("%.1f ", rainfall[i]);

 

//variable initialization

low = 1;

high = 1;

lowRain = rainfall[1];

highRain = rainfall[1];

total = 0;

 

//calculate the lowest, highest and averaage rainfall

for(int i=1; i<=12; i++)

{

if(lowRain>rainfall[i])

{

lowRain = rainfall[i];

low = i;

}

if(highRain<rainfall[i])

{

highRain = rainfall[i];

high = i;

}

total = total + rainfall[i];

}

 

avg = total / 12;

 

//display the result

printf("\n\nThe total rain that fell was %.1f inches", total);

printf("\nThe average monthly rainfall was %.1f inches.", avg);

printf("\nThe lowest monthly rainfall was %.1f inches in %s.", rainfall[low], monthName[low]);

printf("\nThe highest monthly rainfall was %.1f inches in %s.", rainfall[high], monthName[high]);

return 0;

}

You might be interested in
Describe an example of a very poorly implemented database that you've encountered (or read about) that illustrates the potential
liraira [26]
I have no clue what you are talking about I am so sorry
5 0
3 years ago
According to the reading on the course web pages, the earliest usage of cooking began around _____ million years ago.
fenix001 [56]

Answer:

According to the reading on the course web pages, the earliest usage of clothes began around ____ million years ago. 3.4 1.5 0.8 0.5 1.7 2. According to the reading on the course web pages, lime mortar was probably discovered from annealing: Charcoal Obsidian Flint Glass 3.

Explanation:

6 0
3 years ago
How do I change my keyboard's debounce time?
Zanzabum

in the control board type:

HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response\BounceTime

3 0
2 years ago
Read 2 more answers
Help it's the last question quickkk​
aniked [119]
I would say the answer is b, but ⟟ might be wrong
7 0
3 years ago
Let's say that you handle the IT systems administration for your company. There's a server inside of your organization that chec
kirill115 [55]

From server do some file transfer to client PC to sync to the server.

<u>Explanation:</u>

As IT System administrator if PC or client or workstation or laptop not connected to network more than 3 months from windows server we need to refresh the connection and redo the connection from server to the client to do sync the activities.

Moreover from domain server refresh and re sync activities to establishing the connection.

Go to client PC or workstation or desktop login log and logout from the PC and login to domain account by changing the password.

7 0
2 years ago
Other questions:
  • Jannette has been experiencing slow performance on her computer. Today she received an error message saying that an update to he
    12·2 answers
  • Explain the function of the Ribbon in Microsoft Word.
    15·1 answer
  • A manager wants to set up an area that is not on the LAN but not quite on the Internet. This area will house servers that will s
    5·1 answer
  • Diagnosing is solving the problem, and trouble shooting is figuring out what the problem is.
    15·1 answer
  • What is the program that searches through data bases?
    10·1 answer
  • In the single-site processing, single-site data (SPSD) scenario, all processing must be done on the end user's side of the syste
    10·2 answers
  • 1. A tachometer measures:
    8·1 answer
  • When specifying keywords to conduct an internet search, which of the following parts of speech will be the most useful??
    6·1 answer
  • There are two main advantages to using multiple threads in a process: 1) Less work involved in creating a new thread rather than
    7·1 answer
  • Suppose you are developing a data visualization application DataViz which calls some functions from a statistics library class S
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!