100%(37)37 out of 37 people found this document helpful
This preview shows page 1 out of 1 page.
Unit 3 Graded Exercise 2: Calculate the Averageusing an Array#include<stdio.h>intmain(){intn, i;floatnum[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"
You've reached the end of your free preview.
Want to read the whole page?
Spring '17
Grammatical number,Carriage return,printf,sum += num