In this c programming example we will learn calculate average of the given numbers
#include <stdio.h> int main() { printf("Enter 5 integers: "); // taking input and storing it in an array total = 0; printf("Average = %f\n", total/(float)n); |
Enter 5 integers: 2
4
6
7
9
Average = 5.600000