Oh ya! Haha, thanks (I would use floats, and a more simple setup, but like I said, trying out different things);
(ended up finishing it, thanks guys )
Code:
#include <stdio.h>
//Title: Min, Max, and Average
//Purpose: Is to have a given amount of numbers input and the average displayed
//Creator: Austin Salgat
main()
{
int a = 1; //counter
int d; //amount of #s averaged
double b; //current # inputted
double c = 0.0; //total of all b
double e = 0.0; //max #
double f = 999.999; //min #
printf("**************************************\n*** Find Min, Max, and Average ***\n*** Created by Austin Salgat ***\n**************************************");
printf("\n\nHow many numbers do you wish to put into this average?: ");
scanf("%d",&d); //input how many numbers to average
while(a <= d)
{
printf("\nInput number %d: ",a); //input numbers
scanf("%lf",&b); //input numbers to be averaged
e = (b>e) ? b : e; //input new max
f = (b<f) ? b : f; //input new min
c = c + b; //add all the numbers up
printf("\nThe average of the %d number%c is %.2lf.",a,a==1?' ':'s',c/a); //displays average of the sum of all 4 numbers inputted
printf("\nThe max is %.2lf and the min is %.2lf.\n",e,f); //displays min and max
++a; //tell program to go to next number
}
printf("\n\n\nTo exit this program, simply type a letter and press enter!: ");
scanf("%d",a);
return(0);
}