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
serious [3.7K]
1 year ago
8

Write a java program to find the average of any three numbers.​

Computers and Technology
1 answer:
nikklg [1K]1 year ago
7 0

import java.util.Scanner;

public class JavaExample {

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

System.out.print("Enter the first number: ");

double num1 = scan.nextDouble();

System.out.print("Enter the second number: ");

double num2 = scan.nextDouble();

System.out.print("Enter the third number: ");

double num3 = scan.nextDouble();

scan.close();

System.out.print("The average of entered numbers is:" + avr(num1, num2, num3) );

}

public static double avr(double a, double b, double c)

{

return (a + b + c) / 3;

}

}

<em>The </em><em>output </em><em>is </em><em>attached </em><em>to </em><em>the </em><em>answer. </em><em> </em><em>You </em><em>can </em><em>also </em><em>check </em><em>it.</em><em>. </em>

You might be interested in
Computer are most wonderful creation of 21st century how ?​
son4ous [18]

Answer:

It can do all the functions at a speedy rate and also helps us to search and progress in our homes and businesses. A computer can therefore be called a calculator with a twist for not only does it perform fast calculations, but it also has other special characteristics.

Explanation:

hope it helps you

6 0
2 years ago
Laura has many online accounts discuss the privacy concerns associated with individuals use of the Internet
Ronch [10]
When you have only one account that narrows down how much information you have given out the the internet world. At the same time this lines you up with specific info about where you might live.... etc... 

When you create multiple accounts you have many different, lets say "connections", to the internet world. At the same time by having multiple accounts that can jumble up the information and make it harder for people to break into your computer, find where you live, etc... 
8 0
3 years ago
Help me out here pleaseeeee
mel-nik [20]

Answer:

Payment

Explanation:

3 0
3 years ago
Read 2 more answers
In a linux script, the line ____ is important because it identifies the file as a script.
igor_vitrenko [27]
The closest line to that would be the first line:


#!/bin/bash

echo "Hello World!"


BTW, the "#!" is referred to as a she-bang. When those are the first characters executed, the (requires an absolute path) program that follows is launched, and the rest of this file is given to it as data. To run this like a program, the execute permissions need to be set ( chmod 0755 script.sh ).
8 0
3 years ago
Which browser feature will delete your history, cache, and cookies the moment you close the special window
AURORKA [14]

Answer:

Private Browsing

Explanation:

Stuff like DuckDuckGo or Brave

6 0
3 years ago
Other questions:
  • What do we call the distribution and access of illegal copies of digital books??
    10·1 answer
  • The figure below shows a black and white image with a resolution of 720×504. Identify how much memory (in bits) will be occupied
    15·1 answer
  • What feature of virtualization software allows you to revert to a previous point in time in the event you make an unrecoverable
    9·1 answer
  • Explain the difference between good and bad table structures. How do you recognize the difference between good and bad structure
    14·1 answer
  • Which of these is not a valid form<br>layout in Microsoft Access?​
    11·1 answer
  • This image shows a web designer’s grids for different pages on a website. The uppermost box on each page is the website’s identi
    15·2 answers
  • A processor's speed is measured in megahertz (MHz), or millions of instructions per second; and gigahertz (GHz), or billions of
    9·2 answers
  • (50 POINTS)
    12·1 answer
  • 1. What is the difference between a group and a topic?
    10·1 answer
  • How do I find unwanted programs on my computer?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!