C Program to Calculate Average Using Arrays
This program takes n number of element from user (where, n is specified by user), stores data in an array and calculates the average of those numbers. To understand this example, you should have the knowledge of following C programming topics: C program to calculate the power using recursion Source Code to Calculate Average Using Arrays #include <stdio.h> int main() { int n, i; float num[100], sum = 0.0, average; printf("Enter the numbers of elements: "); scanf("%d", &n); while (n > 100 || n <= 0) { printf("Error! number should in range of (1 to 100).\n"); printf("Enter the number again: "); scanf("%d", &n); } for(i = 0; i < n; ++i) { printf("%d. Enter num...