I want to be able to print out the largest age inputted by the user as well as the smallest age.
Also, I noticed my program doesn't include the numbers after the decimal point. It would just say 25.00 for example, rather than 25.25.
Any help is greatly appreciated!
#include "stdafx.h"
#include "stdio.h"
void main()
{
int age[11];
float total = 0;
int i = 1;
float average;
do
{
printf("# %d: ", i);
scanf_s("%d", &age[i]);
total = (total + age[i]);
i = i + 1;
} while (i <= 10);
average = (total / 10);
printf("Average = %.2f", average);
}