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
Should I learn Python, C++, C# or VB to start off programming games for Windows. Open to other language recommendations as well!
Svetllana [295]
In theory, you can of course use any language you like, but there are a few commonly used ones.
From your list it would be c++ or c#, because if you actually have the interest long term then those will be the languages used by the various "big"/well known/used engines.
I would suggest c#, because it can be used with the Unity engine, which has an enormous community with help resources especially to start out and learn to program or game development.
On the other hand I would also suggest JavaScript. It isn't used for any of the big title development, but for all the *.io games like slither and so on. When looking at such games you will quickly notice that they are generally much simpler (for example 2D not 3D), because game engines are just simpler in JavaScript. While this is obviously limiting it might help to get something simple actually working, instead of getting stuck in extra complexities and additional features until you lose your motivation.
The basic programming you learn is still the same, so after you have learned a language you can quickly pick up most others.
<span />
7 0
3 years ago
Orifice tubes are A. coded in American models only. B. coded by number for easy identification. C. similarly but not exactly siz
timurjin [86]
I'd go for (C) similarly but not exactly sized

Basically, to explain an orifice tube in Layman’s context, it is a car’s air conditioning system and is the exact place where the cold happens. Not all orifice tubes are standard sized and this means that different model vehicles use different sizes. These tubes are often color-coded for easy identification.






8 0
3 years ago
Which Additional Authorization List item can replace the hook at the end of the winch cable for fastening the cable to some load
satela [25.4K]

Answer:

Shackle

Explanation:

A winch may be defined as a mechanical device which is used to pull in or let out the rope or cable maintaining its tension. It can also adjust the tension of the cable or the rope.

It is mainly used in tow trucks, elevators and steam shovels.

Shackle is one of the additional authorization list of a vehicle with a winch which can be used to replace the hook of the cable of the winch.

8 0
3 years ago
When you create a user with the useradd command, what is the immediate state of it?
kipiarov [429]

When a user is created in Linux using the useradd command, the <em>immediate state</em> of the created account is locked.

  • The useradd command can be invoked in other to create a new user account using the following command

sudo useradd fast_user

<em>#fast_user</em><em> </em><em>is</em><em> </em><em>the</em><em> </em><em>name</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>account</em><em> </em><em>created</em><em> </em>

  • At this point, the account has been created but it will be locked until the required login details are set. This can be achieved using the line ;

sudo passwd fast_user

Therefore, an account created using the useradd command is in a locked state.

Learn more :brainly.com/question/12135504?referrer=searchResults

5 0
2 years ago
If a clean install is performed on a hard drive with a previous install of windows and the drive is not re-formatted during the
Tpy6a [65]
Either wiped off the drive, or right next to the new ones, I do not recommend keeping the old files.
3 0
3 years ago
Other questions:
  • Ideation includes all of the following EXCEPT
    5·1 answer
  • Professional photographers often use the lowest quality settings on their cameras since this can be reversed in Photoshop.
    7·2 answers
  • The _________ indicates the number of elements, or values, an array can hold
    14·1 answer
  • What is the computer that is similar to a destop but smaller in size
    8·1 answer
  • Random Access Memory is tempory computer memory that stores works in progress
    7·1 answer
  • Which term describes a visual object such as a picture a table or text box
    15·2 answers
  • Question # 7
    11·1 answer
  • To create an SSL connection, a Web server requires a ________, which is an electronic document that confirms the identity of a w
    12·1 answer
  • Which is NOT one of the basic characteristics of life? What feature of Microsoft
    5·1 answer
  • open your browser and enter the address of this ftp site in the address box: ftp.cengage. if your browser supports ftp, a logon
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!