Caceres wrote:
Thanks wtd.
I'm just curious if there's such thing as:
if(number[count] < minimum) {
minimum!=-1;
minimum=number[count];
}
The minimum!=-1 doesn't work, but I was wondeirng if there's a statement I can add there, that'll erase the -1 data. THanks.
No. You can only set it to another value. You cannot set it to some undefined state.
Quote:
And by the way, does wtd..mean What the duck?
~Caceres
No, and yes.
As for your Java problem... perhaps you should concentrate on reading in the grades, and then worry about finding the average, min and max.
You will need at least one value known, after all, if you wish to make comparisons to figure out the minimum and maximum.