Average of 3 Numbers in Java

Calculate Average of 3 Numbers in Java

Here you will get example code to calculate the Average of 3 Numbers in Java programming. For calculating average, we needed 3 number values from the user. Here we will use scanner class to get input from the user.

Program Code: Average of 3 Numbers in Java

Output

C:\CodeRevise\java>javac AverageCalc.java

C:\CodeRevise\java>java AverageCalc
Enter the first number: 10
Enter the second number: 20
Enter the third number: 30
The average of given numbers is: 20.0

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top