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
Iteru [2.4K]
3 years ago
5

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 then display the average of the three rainfall amounts, rounded to 2 decimal places.
Computers and Technology
1 answer:
Eduardwww [97]3 years ago
8 0

Answer:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

   Scanner input = new Scanner(System.in);

       System.out.println("Enter the month name:");

       String month1 = input.next();

       System.out.println("Enter the amount of rain for "+month1);

       double month1Rain = input.nextDouble();

       System.out.println("Enter the second month: ");

       String month2 = input.next();

       System.out.println("Enter the amount of rain for "+month2);

       double month2Rain = input.nextDouble();

       System.out.println("Enter the Third month: ");

       String month3 = input.next();

       System.out.println("Enter the amount of rain for "+month3);

       double month3Rain = input.nextDouble();

       double averageRainfall = (month1Rain+month2Rain+month3Rain)/3;

       System.out.printf("Average Rainfall is: %,.2f  ", averageRainfall);

   }

}

Explanation:

This is written in Java Programming language

  1. Import  the scanner class to prompt user for the inputs (Months and amount of rainfall for each month)
  2. Find the average of the three rainfall amount by adding up and dividing by 3
  3. Output the average. Pay particular attention to the use of java's printf in order to print the average to 2 decimal places
You might be interested in
What are the uses of DVD Ram​
Verdich [7]

Answer:

Like ordinary random access memory (RAM), it can be repeatedly read, written to, and erased. Intended mostly for removable computer storage, DVD-RAM provides the capabilities of Rewriteable CD (CD-RW) - users can run programs from the discs, copy files to them and rewrite or delete them.

4 0
3 years ago
Read 2 more answers
Do you think should give credit to people who invented viral dances?
guajiro [1.7K]

Answer:

michal jackson i think who credit to people invented viral dances.

3 0
3 years ago
Read 2 more answers
2. (40 POINTS) Assume a 16-word direct mapped cache with b=1 word is given. Also assume that a program running on a computer wit
Fynjy0 [20]

Answer:

See the attached file for the answer.

Explanation:

(a) Find attached of question a.

b. the miss rate for the above instructions address sequence is 100% as no address is repeated.

5 0
3 years ago
Alisha appears to be overconfident which makes her unapproachable to her employees. Which negative quality is she displaying?
sergeinik [125]

As the question states Alisha is displaying the quality of overconfidence. This can effect not only herself in her work but also others. She can be demotivated and may even lose confidence completely. This behavior can be fixed by approaching towards her. you can call her very assuming, boldfaced or impertinent

HOPE THIS HELPS. PLEASE THANK AND MARK AS BRAINLIEST : )

7 0
4 years ago
Read 2 more answers
HELP PLLISSSSSSSSSS!!!!!!!!!! its unit test will mark as brainliest
astraxan [27]

Answer:

1. file

2. true:false

3. prioitized

4. drafts

Explanation:

8 0
3 years ago
Other questions:
  • A virus that attaches to an executable program can do anything that the program is permitted to do.
    7·1 answer
  • You have a hard disk that is formatted with the fat32 file system. you would like to implement file and folder permissions on th
    10·1 answer
  • What rule should be followed when determining how many bullets you will include on a slide
    8·2 answers
  • You are required to justify the need to implement a collapsed core network. Which justification below makes sense for a collapse
    7·1 answer
  • Grace whistles while tickling Camille with a feather. Eventually, Camille starts to squirm and giggle every time Grace whistles,
    10·1 answer
  • Join zoom meet for time pass purpose <br><br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • Consider an unpipelined or single-stage processor design like the one discussed in slide 6 of lecture 17. At the start of a cycl
    10·1 answer
  • Read the following sentences: “The Soviet Union’s famous launch of a satellite called Sputnik had been an embarrassment for the
    12·1 answer
  • Test if the word mold is stored in the variable word. Computer science.
    9·1 answer
  • You will need to convert the following binary numbers to hexadecimal. Table 1 contains 16 problems. The first one is completed f
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!