Write a C Program to Calculate Average Using Arrays

Prem Tiwari - - C Programming Tutorial

In this program, I will explain how to calculate the average of entered numbers using an array in c programming language. This program will takes n numbers as input and store it in an array and then calculate the average of entered numbers.

During the program execution, first, enter the number of elements to calculate the average, and then enter the numbers of elements after that this program will automatically calculate the average number and print as output.

Write a C Program to Calculate Average Using Arrays

Porgram Output:

Enter the numbers of elements:5
1. Enter number: 10
2. Enter number: 20
3. Enter number: 30
4. Enter number: 90
5. Enter number: 80
Average = 46.00

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.