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
Use the Web as a resource to study the PDF format. a. Describe how PDF provides output that is consistent across different types
Deffense [45]

Answer:

Explanation:

PDF or (Portable Document Format) this is a format standard to store, design, administrate, this standard include bit maps format, image format, objects, and text format, all these formats to show pages quickly, PDF is a standard and for the devices can show this format, devices like prints, laptops, or even cellphones.

6 0
4 years ago
Given that ∠XQR = 180° and ∠LQM = 180°, which equation could be used to solve problems involving the relationships between ∠XQM
mr Goodwill [35]

C) 180 − (140 − 7a) = (70 − 3a)

Answer:

C) 180 − (140 − 7a) = (70 − 3a)

Explanation:

i got it wrong by clicking D on usatestprep

4 0
3 years ago
What is the network id with cidr notation for the ip address 172.16.32.108 with the subnet mask 255.255.255.0?
kow [346]
172.16.32.0/24






-------------------------------
7 0
4 years ago
FREE BRAINLIEST!!!
Nastasia [14]

Answer:

B

Explanation:

4 0
3 years ago
Read 2 more answers
you'll be organizing the various databases in your organization, and have recommended hiring a/an?A. internet specialist B. comp
jek_recluse [69]
Either c or d, most probably D
7 0
4 years ago
Read 2 more answers
Other questions:
  • When a user receives an email warning about the dire consequences of possible virus attacks on their pc or tablet, it is often a
    6·1 answer
  • strategy that is used to help improve the chances that your site will be found by search engines is known as search engine
    12·1 answer
  • Webster defines risk as "the possibility of loss or injury". Therefore, driving a motor vehicle is a risk.
    12·1 answer
  • Given a PrintWriter reference variable named output that references a PrintWriter object, write a statement that writes the stri
    5·1 answer
  • which of the following is another term for a variable, such as cost or schedule, that limits the freedom of design, development,
    11·1 answer
  • Why when I put a question in the search bar it says something went wrong?
    9·1 answer
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
  • While developing a network application, a programmer adds functionally that allows her to access the running program without aut
    14·1 answer
  • Application of computer in insurance​
    14·1 answer
  • In a program you need to store identification numbers of 5 employees and their weekly gross pay.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!