17. calc.c

/*this program inputs 7 number and display average and total*/
#include <stdio.h>
int main ()
{
float numbers[7],total=0;
int index;
printf("Welcome to the 7 number average program\n");
printf("=======================================\n");
for (index=0;index <7;index++)

printf("Please enter a number:  ");
scanf("%f", &numbers[index]);
total= total + numbers[index];
}
printf("\nThe average is %4.2f and the total is %4.2f\n\n", 
total / 7, total);
}