Write a program in C that uses a function to find the average age of students of a class chosen for a junior quiz competition.
C Programming Language Function in C Language (Article) Function in C Language (Program)
2369Program:
#include #define SIZE 50 float avg_age(int [],int); int main(void) { int i,b[SIZE],n; float average; printf("\n How many students are in the team:\n"); scanf("%d",&n); printf("\n Enter the age of students in the team:\n"); for(i=0;i
Output:
How many students are in the team: 2 Enter the age of students in the team: 20 21 the average age of students =20.500000
Explanation:
None
This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.