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
Nat2105 [25]
3 years ago
6

Write a program that asks the user to input four numbers (one at a time). After the four numbers have been supplied, it should t

hen calculate the average of the four numbers. The average should then be displayed.
Computers and Technology
1 answer:
nika2105 [10]3 years ago
6 0

Answer:

<u>Output</u>

Enter first number:  

1

Enter second number:  

2

Enter third number:  

3

Enter fourth number:  

4

Average: 2.5

Explanation:

Below is the java program to calculate the average of four numbers:-

import java.util.Scanner;

public class Average {

public static void main(String[] args){

 int a,b,c,d;

 double average=0.0;

 Scanner s=new Scanner(System.in);

 System.out.println("Enter first number: ");

 a=s.nextInt();

 System.out.println("Enter second number: ");

 b=s.nextInt();

 System.out.println("Enter third number: ");

 c=s.nextInt();

 System.out.println("Enter fourth number: ");

 d=s.nextInt();

 average=(a+b+c+d)/4.0;

 System.out.println("Average: "+average);

}

}

You might be interested in
When you copy a formula that contains an absolute reference to a new location, the reference ____.
iVinArrow [24]

When you copy a formula that contains an absolute reference to a new location, the reference remain constant . Relative references change when a formula is duplicated to another cell. Unlimited references, on the different hand, remain constant no matter where they are copied.

<h3>What stays constant in life?</h3>
  • One constant since the start of time might be switching, however, the fear of change is also a constant.
  • Since times immemorial, humans have liked routine. It makes us feel in command of our lives.
  • Some common synonyms of regular are faithful, loyal, resolute, staunch, and steadfast.
  • While all these words mean "firm in adherence to whatever one owes loyalty," they constantly pressure continuing firmness of emotional passion without necessarily meaning strict obedience to contracts or vows.

To learn more about  remain constant , refer to :

brainly.com/question/24868934

#SPJ4

4 0
2 years ago
Jennine has a table that she has created in Word. She has removed all borders inside the table, but now she wants a box around t
Crazy boy [7]

Answer:

The steps to create table, hide boarder and show border around the whole table is given below.

Explanation:

<u>1. Create Table</u>

  1. Click on insert Tab
  2. In insert tab, Click on Table
  3. Select No. of row and columns to create the table

<u>2. Hiding Boarders</u>

  1. Click on Design Tab
  2. In table style section Choose the layout that have no boarder

<u>3. Add boarder Around table</u>

  1. Click on Design Tab
  2. Select whole table by clicking on Plus sign on the top right corner of table
  3. Click on arrow of boarders button in Boarders section in design tab
  4. Select the "outside boarder" option from the list

<em>By following above mentioned steps, jennnine can draw a boarder around the table to distinguish it from rest of the document.</em>

8 0
4 years ago
python Assume letters A, E, I, O, and U as the vowels. Write a program that prompts the user to enter a string and displays the
Roman55 [17]

Answer:

vowels = 0

consonants = 0

string = input("Enter string: ")

for x in string:

   if x.isalpha():

       if x in "AEIOU":

           vowels += 1

       else:

           consonants += 1

print("Vowels =",vowels)

print("Consonants =",consonants)

Explanation:

8 0
3 years ago
Or operator of boolean algebra is denoted by:<br>*<br>+<br>-<br>.​
OlgaM077 [116]

Answer:

or operator is denoted by + sign

7 0
3 years ago
Joe is a computer service technician. People in his neighborhood usually depend on his suggestions for purchasing any computer a
ser-zykov [4K]

Answer:

C

Explanation:

Because he's knowledge ,everyone asking he's opinion if i am not wrong.

I hope i did help you on this questions

8 0
4 years ago
Read 2 more answers
Other questions:
  • Aside from the smart cell phones used by a billion people, list and describe four
    15·1 answer
  • Which is the largest unit of measurement for computer data?
    14·1 answer
  • What field in an IPv4 packet is altered to prioritize video streaming traffic over web surfing traffic?
    7·1 answer
  • Which of the following is an example of a currency Number format in Excel?
    9·1 answer
  • Dereck works for long hours on his computer. He frequently experiences physical strain by the end of the day because he does not
    8·2 answers
  • can Results shown at the top of the Google search engine results page (SERP) always get high Needs Met ratings
    10·1 answer
  • What is the correct order of the phases of the software development process?
    12·1 answer
  • #include
    12·1 answer
  • What is the role of UPS in Computer security?<br>4 marks answer​
    12·1 answer
  • Which system provides an easier way for people to communicate with a computer than a graphical user interface (GUI)
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!