Java Program to find the Average of N numbers - The Coding Shala
Home >> Java Programs >> Average of N numbers
In this post, we will learn how to find the Average of N numbers in Java.
Java Program to find the Average of N numbers
Write a Java program to find the Average of N numbers, take all the n numbers as input.
Input: number of elements is = 5
elements = 1, 2, 3, 4, 5
avg = (1 + 2 + 3 + 4 + 5) / 5 = 3
Other Posts You May Like
- Java Program to take input numbers into an Array
- Java Program to Add Two Numbers
- Java Program to find Sum of Digits of a Number
- Java Program to Swap Two Numbers
- Java Program to Multiply Two Numbers