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
Sidney works in the accounting department. His boss just assigned him a task that involves creating budget formulas for the comp
MA_775_DIABLO [31]

In excel spreadsheets, Sidney need to consider specifying relationships between the information you have stored in your spreadsheets when creating formulas. The elements that will help you understand using spreadsheet are the constants, operators, references and functions. This will enable her to use the formulas, without hassle in spreadsheets.

3 0
3 years ago
Types of email resources. Examples
denis23 [38]
Newsletter emails
Milestone emails
Welcome emails
Review request emails

Hope this helps!
8 0
3 years ago
Enter just the letter of the correct answer
Viefleur [7K]

Answer:

C. WDS

Explanation:

DND is for rolling dice and arguing about alignments

WiFi Analyzer just monitors your WiFi's stats and health

--> WDS lets you wirelessly connect two routers for larger range

DHCP is for IP address distribution.

3 0
3 years ago
For each scenario, select the best solution to try from the drop-down menu. A computer will not connect to the network. An IP ad
Inessa05 [86]

Answer:

1) Check the switches, routers, and hubs.

2) Try logging off and on again.

3) Make sure everything is plugged in and turned on.

4) Restore files from backup versions.

Explanation:

Hope this helped!! :D

6 0
3 years ago
Which is correct? And for the second one the drop down answers are 1. Leadership
SIZIF [17.4K]

Answer:

It is a spreadsheet application. the second should be leadership

4 0
3 years ago
Read 2 more answers
Other questions:
  • GIVING BRAINLIEST What does output allow a computer to do? Display information Receive information Do complex math problems Do m
    6·2 answers
  • Taylor volunteered as a computer support specialist for his university's online library. Which part of his resume should include
    10·2 answers
  • Which describes the hypothesis of an experiment? the variable changed by the experimenter/ the quantity that must remain constan
    9·1 answer
  • This refers to the people involved in the data processing operation.
    14·1 answer
  • What is the family access code right now?
    5·1 answer
  • You’ve been tossed into an insane asylum. What do you tell the people there to prove to them that you don’t belong inside?
    7·2 answers
  • In GD, what does RWR stands for?
    9·1 answer
  • What is number system?<br>​
    11·1 answer
  • Which of the following digital communicatio media does not require a connection to the internet
    11·1 answer
  • What is the meaning of Ram?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!