I've been googling all day and reading through my book, but I just can't seem to find the answer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
int main()
{
double grade1;
double grade2;
double grade3;
double grade4;
double grade5;
double avg_grade;
//Input:
cin >>grade1;
cin >>grade2;
cin >>grade3;
cin >>grade4;
cin >>grade5;
cout<<"Min = "<<min(grade1, grade2, grade3, grade4, grade5);
|
now when I use
|
cout<<"Min = "<<min(20,2)<<endl;
|
I get an output of 2. Is there a way to make this work for user input
Last edited on
for user/file/network/device/etc inputs track this kind of data as it comes in rather than get them all and seek it later.