Write a Java Program that asks the user for 12 months worth of rainfall stats. These values should be entered by the user and placed in an array. Once all the values are entered the
program should print out the average rainfall per month, highest rainfall month, and lowest rainfall month. Use the following values: Jan - 1.2", Feb - 2.8", Mar - 4.9". Apr - 11.3", May
12.3", June - 10.1", Jul - 7.9". Aug - 8.1", Sep - 6.7", Oct - 5.3", Nov. - 4.2". Dec - 3.9".
The average is: 6.5583, month with largest - May, month with lowest - Jan.
-
5

Answers

Answer 1

The program is an illustration of conditional statements and loops.

Conditional statements are used to make decisonsLoops are used for iterative purposes

The main program.

The program written in Java, where comments are used to explain each action is as follows:

import java.util.*;

public class Main {

public static void main(String[] args) {

   Scanner input = new Scanner(System.in);

   //This declares the array

   double rainfall[] = new double[12];

   //This initializes the total amount of rainfall

   double total = 0;

   //This gets input for the array

   for(int i = 0; i < 11; i++){

       rainfall[i] = input.nextDouble();

       total+=rainfall[i];

   }

   //This initializes the smallest and the largest amount of rainfall

   double largest = 0; double smallest = 0;

   int smallestMonth = 0; int largestMonth = 0;

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

       //This determines the largest amount of rainfall

       if(rainfall[i] > largest){ largestMonth = i; largest = rainfall[i]; }

       //This determines the smallest amount of rainfall

       else if (rainfall[i] < smallest){ smallestMonth = i; smallest = rainfall[i]; }

   }

   //This initializes the months

   String months[] = new String[]{"January","February","March","April","May","June","August","September","October","November","December"};

//This prints the required output

System.out.println("The average is: " + total/12+", month with largest - "+months[largestMonth]+", month with lowest - "+months[smallestMonth]);

}

}

Read more about conditional statements and loops at:

https://brainly.com/question/24833629


Related Questions

Explain three ways of selecting records to merge to a new document

Answers

Answer:

1.

Click the Mailings tab.

2.

Click the Start Mail Merge button.

3.

Select Step-by-Step Mail Merge Wizard

Which logic gate will invert a single value

Answers

Answer:

Answer is. C. NOT abate

Explanation:

This statement does not describe a guideline for effective presentation layouts.


Consistent color schemes should be used on each slide.

Font size should be as large as possible.

No more than two fonts should be used on a slide.

Font colors should blend with the background.

Good luck :)

Answers

The statement that does not describe a guideline for effective presentation layouts is Font size should be as large as possible.

What are the tips for creating an effective presentation?

In the General planning of a Presentation. the following steps should be taken.

Do plan carefully and well.Always conduct your research.Do Time your presentation.

Conclusively, The statement that does not describe a guideline for effective presentation layouts is Font size should be as large as possible. This is because, the front size that should be used should not be too large or too small.

Learn more about presentation from

https://brainly.com/question/24653274

Answer:

d

Explanation:

font size should be as large as possible.

why might you want to clear cookies from your computer from time to time?

Answers

Answer:

Although small, cookies do occupy space on your computer. If there are enough of them stored over a long period of time, they could slow down the speed of your computer and other devices. Flagged, suspicious cookies. If your antivirus software flags suspicious cookies, you should delete them

Write a function that receives a one-dimensional array of integers and returns a Python tuple with two values - the minimum and maximum values of the input array. The content of the input array must not be changed. You may assume that the input array will contain only integers, and will have at least one element. You do not need to check for these conditions. For full credit, the function must be implemented with O(N) complexity.

Answers

The function that receives array of integers and returns  the minimum and maximum values as a tuple is as follows:

def min_max(array):

    x = min(array)

    y = max(array)

    return (x, y)

print(min_max([4, 6, 7, 8, 1, 8, 14]))

Code explanation

The code is written in python.

We defined a function named "min_max". The function accepts a parameter called array.The variable x is used to store the minimum value of the array.The y variable is used to store the maximum value of the array.Then, we return the minimum and maximum values as a tuple.Finally, we call the function with the required parameter.

learn more on python here: https://brainly.com/question/13199913

Thinking about the operations in these games which gam is likely to be one of the oldest games in the world

Answers

Answer:

ill say the space race arcade game

Explanation:

Can someone give me their opinion on this discussion? Post your discussion please.

Answers

Hi!

I have chosen Scenarios A, B and C.

For Scenario A, it DOES make sense to use a template. This is because you will be mass sending thank you letters to your purchasers.

For Scenario B, it DOESN’T make sense to use a template. This is because the letter you are writing will probably just be a one-off letter, and you won’t need to write another one.

For Scenario C, it DOESN’T make sense to use a template. As mentioned above, the report will probably just be a one-off report, so it doesn’t make sense to use a template.

I hope that this helps you out!

The creation of the Internet and smartphones and the rise of e-mail and text messaging have led to ________ in the quantity of letters and other first-class mail since 2000.

Answers

Hello!

The answer would be: a decrease.

I hope that this helps you!

The creation of the Internet and smartphones and the rise of e-mail and text messaging have led to decreasing in the number of letters and other first-class mail since 2000.

What is an Email?

"Email is the type of communication that has to replace any other communication as electronic mail helps us to send photos and even videos to someone in a span of some seconds also we can do it from any place and from any devices that we have at the moment."

Since 2000, there has been a decline in the use of first-class mail due to the creation of Technology, phones, and the growth of e-mail, especially text messaging. This has helped the people to transverse with each other and this was a beneficial task that was to be taken advantage of in relation to speed and efficiency.

Learn more about Email, here:

https://brainly.com/question/15072408

#SPJ2

Find the manufacturers of at least 2 different computers (PCs or Laptops) with speeds of at least 3.0

Answers

Answer:

Charles's Babbage and ladyougusta ada lovence

Write a code snippet Now write your own code snippet that asks the user to enter two numbers of integer type (one at a time) and prints their sum. >>>your code starts here HTML Editor B

Answers

Explanation:

num1= print("Enter a number :")

num2 = print("Enter a number :")

sum = num1 + num2

print(sum)

Match the tools and equipment with their uses

Answers

Answer:

roller- machine that stirs

Explanation:

and tills soil

Which is the correct code to prepend an item to a list? a) ListPrepend(list, newNode) { if (list-head == null) { list-head = newNode list-tail = new Node } else { list-head-next = new Node list-head = new Node } b) ListPrepend(list, newNode) { if (list-head == null) { list-head = new Node list--tail = new Node } else { newNode--next = list--tail list--tail = newNode} c) ListPrepend(list, newNode) { if (list-head == null) { list-head = new Node list-tail = new Node } else { newNode-next = list --head list-head = new Node } d) ListPrepend(list, newNode) { if (list-head == null) { list-head = new Node list-tail = new Node } else { list-tail--next = new Node list-tail = newNode }

Answers

The correct code is ListPrepend(list, newNode) { if (list-head == null) { list-head = newNode list-tail = newNode } else { newNode--next = list-head list-head = newNode } }.

What are computer codes?

When it comes to computer programming, computer code are known to be a composition of different instructions.

It is often regarded as a system that is made up of sets of rules which are written in a specific programming language.

Note that the code above is the right code as it has the right sequence and no error.

Learn more about Codes from

https://brainly.com/question/22654163

what is the importance of file management and how do you control files over time?\

Answers

Answer:

File management improves productivity by lowering the amount of time employees spend looking for documents. It also cuts down on the time it takes to recreate files when an employee can't find the original.

To control files over time, here are some tips.

-Delete unnecessary files

-Take immediate action on files you encounter

-Consolidate files when possible

-Have less folders as possible

55 POINTS HElp!!! ASAP ASAP ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
Why do we need the Domain Name System (DNS)?


Given the domain name www.flamingflamingos.eu, what is the top level domain in this name?


How many different nameservers need to be visited in order to find the location of www.flamingflamingos.eu, including the ROOT server?


How long does this whole process take?


Once the location is acquired (IP address 88.151.243.8) what does your computer do with that information?

Answers

Answer:

|

V

Explanation:

we need the DNS so browsers can load Internet resources.

the top part is eu,so its based in europe \

4 serveers

1-2 seconds

sends message to website and waits for a response

when creating a report,you can mske groups and subgroups by?​

Answers

Answer:

content of the report

Explanation:

you must clarify all thingsthe report would be clean and clear

why are microwave antennas placed on top

Answers

Microwave transmission towers can also be placed strategically on rooftops, hills and even mountains to make them as efficient as their counterparts but not as expensive. This is why it's no wonder why more companies are now replacing their old systems with microwave antennas.

You want to allow users inside your organization to share your dashboard, and to edit your dashboard by adding tiles. How will you do this

Answers

To share your dashboard, one can click on Share your dashboard with internal users.

How do I share a dashboard with another user?

One can be able to share Dashboard data to people who are not able to access your Analytics account by clicking on the Share > Email option and then one can share it.

Conclusively, Note that one can still send the other teammate a customized email with an attached PDF file that depicts your Dashboard to them.

See options below

Select an answer:

Share your dashboard with internal users.

Publish the dashboard as a contact pack.

Publish the report on the web.

By creating a dashboard in a group.

Learn more about dashboard from

https://brainly.com/question/1147194

Given int[] array, return a new int[] that contains every other element of array. for example, if array = {0, 1, 2, 3, 4, 5}, return {0, 2, 4}.

Hint: How big does the new array have to be?

Tip: Write down an example array to help find the pattern between the index from the old array and the index in the new array.

Answers

This is how you do it in python:

Code:

def everyother(array):

   return array[::2]

example_array = [0, 1, 2, 3, 4, 5]

print(everyother(example_array))

Output:

[0, 2, 4]

Explenation:

The key to this problem is "array[::2]".

Array[start : stop : step]

Writing "array[::2]" is the same as writing:

Array[0 : -1 : 2] or Begin at 0, stop at the end and take every 2:nd value

HELPPPPPOOP
Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page?
A.
B.
C.
D.

Answers

Answer:b

Explanation:

7
Type the correct answer in the box. Spell all words correctly.
What new skills must Journalists learn to be able to write for new media formats?
Eric and Monika are fresh graduates out of a journalism school. Both are hired by a major news
Eric and Monika must ensure that their writing skills are
and responsive to the
Reset
Next

Answers

Answer:

Edequate to the media

Explanation:

This is because if they write using a different language it may cause damage to the younger ones

aya what's the full form of JPEG ?​

Answers

Hi!jpeg stands for "Joint Photographic Experts Group."

Answer:

"Joint Photographic Experts Group",

Explanation:

JPG is a digital image format which contains compressed image data. With a 10:1 compression ratio JPG images are very compact. JPG format contains important image details. This format is the most popular image format for sharing photos and other images on the internet and between Mobile and PC users.

n algorithm is called recursive if it solves a problem by reducing the problem size while using the same input. True False

Answers

Answer:

true

Explanation:

the recursive algorithm will keep calling it own self until some condition is met, and the value for what it was looking for will be reduce after each execution.

CS Harvard free college course on YT has the great explanation on this.

(b) Write a complete pseudocode for a program to calculate total monthly 3 points
broadband data usage. The program will stop when user enter 0.*

Answers

The pseudocode of the program is the prototype of the actual program

How to write the pseudocode?

The pseudocode of the broadband data usage program is as follows:

Set total = 0

Input data_usage

while data_usage != 0:

    total += data_usage

    Input data_usage

print total

The flow of the pseudocode

The flow of the pseudocode is as follows:

Start by setting the total data usage to 0Next, get inputs of data usage until the user enters 0Add all nonzeros inputsExit the loop, when the user enters 0Print the total data usage

Read more about pseudocode at:

https://brainly.com/question/11623795

Can someone please help me! It’s due Thursday!

Answers

Answer:

if the input is zero the out put is 1

Explanation:

because if you think about it if the input was 1 the output would be zero

Presentations can be saved by selecting Save from the _____ menu.


File


Window


Tools


Format


Good luck :)

Answers

Answer:

Save from the file menu.

Answer:

for tho yeah bro

Explanation:

View filters are applied in what order?​

Answers

Explanation:

in the formal order of filter .

.

.

thanks

View filters are applied to data in the order in which they were introduced by default. If a view already has filters, your new filter will be applied after them.

Question 19 of 2
Which of the following reasons for writing a formal business document would
lead you to write a proposal?
O A. To summarize what happened during a meeting
B. To tell your manager a project is on budget and on schedule
C. To describe what tasks you completed during the week
D. To convince your manager to use a new meeting organization tool

Answers

Answer:

D. To convince your manager to use a new meeting organization tool

Explanation:

a proposal is a plan or suggestion, especially a formal or written one, put forward for consideration or discussion by others: and D. is the only answer that is asking or proposing something.

Find the maker(s) of the PC(s) with the fastest processor among all the PCs that have the smallest amount of RAM.

Answers

Answer:

the makers of PC is Charles's babbage.analog is has small amount of ram

How do I find enchants faster on deepwoken?

Answers

Answer:

Rogue Constructs, Primadon, Fishing

Explanation:

Multiple methods may aid you in finding enchants faster. Notable ways include farming the Rogue Construct at Minityrsa which nets solid total loot (each item is rolled individually for enchants which is why larger chests usually means more enchants and why enchants can be in groups of more than 1 in chests) and farming Primadon. Fishing has also become a prominent method of enchant farming but is less reliable than the other two stated methods if you already have a strong PVE build. Happy enchant farming.

Answer:

Duke

Explanation:

Duke loves to drop enchants!! I use him to get my enchants, primadon sometimes. Rogue construct is ehhh but it works. But go gran sudaruska! Find it at crypt of unbroken!

Ryan has inserted an image into a Word document, but the image is too large. There are sections of the image that he would like to eliminate to decrease the overall size of the image.

Answers

more Explanation                                                  

more explantion

Other Questions
What is the maximum cold holding temperature allowed for shredded lettuce. An airplane company flies 45 airplanes daily. The CEO collects the following passenger counts for a random sample of airplanesfrom the fleet, as shown below.119, 138, 157, 85, 157, 119, 138, 119, 157, 85Assuming that the sample is representative of the entire fleet of airplanes, what would be the mean daily passenger count perplane?A. 124.75. 135.9 C. 127.4 D. 128.5 what are four examples of domestic policy What is an example of a positive human effect on the environment? IM NOT SURE HOW TO SOLVE THIS CAN SOMEBODY HELP ME Which expressions represent 4 less than the product of 2 and 3?Check all that are true.2 (3 4)4 (2 3)4 2 32 3 4(2 3) 4 A weather researcher compared average monthly temperature data forAthens, Greece, and Brussels, BelgiumMadrid BrusselsMean 59F 51'FRange 20.4F 14.1FBased on these data, which statements are true?O A. On average, Madrid has a higher monthly temperature. Its monthlytemperatures also vary more.O B. On average, Madrid has a higher monthly temperature. However,temperatures in Brussels vary more.C. On average, Brussels has a higher monthly temperature. However,temperatures in Madrid vary more.D. On average, Brussels has a higher monthly temperature. Itsmonthly temperatures also vary more.Please please help first answer and the answer is correct will get a brainlist and a 5 star like please help!!! FAST hi please help thanks! If a bug with a mass of 5 grams flies into the windshield of a moving 1000 kg bus, which will have the most force?A. The bug on the busB. The bus on the bug Which of these communities is likely to have a higher percentage of healthy weight people? A. A community that requires a car to get around. B. A community with many fast-food restaurants. C. A community where it is necessary to walk to get around. D. A community without a full service grocery store. Find the distance between the points (-8,-9)and (-3,3) Iron man crashes into a parked car with a force of 8,000 newtons, resulting in a acceleration of 1.14 m/s. if the car has a mass of 1000 kg what is the coefficient of kinetic friction between the car tires and the road? Describe three changes that happen to the air when it is inhaled. Drag each tile to the correct box.Match each systemic obstacle for Black Americans to the governmental action that addressed it.exploitative employerssegregated schoolsunethical medical researchsegregated neighborhoodsSwann decisionarrowRightNational Research ActarrowRightAgricultural Labor Relations ActarrowRightFair Housing ActarrowRight Apply Gray's critique to the editorial, "It's Time for a Nation to Return the ovo? How would you evaluate the editorial in its treatment of the aftermath of Hurricane Katrin and issues of racial division? True or false: Some federal agencies function as independent agencies, rather than as part of a cabinet-level department, because putting the agencies in a department would pose symbolic or practical problems. 3 Write the plural ustedes command for each verb.1. no empezar2. entender3. no probar4. no ir5. almorzar6. no comer7. estar8. prepararam9. no batir10. comprar Help please fast ong im begging PLEASE HELP! WILL GIVE BRAINLIEST!In this problem, we use your critical values table to explore the significance of r based on different sample sizes. what is 3/4 in a percent