I am slowly understanding functions, but I can't completely wrap my head around it yet. What is the purpose of function with nothing in the parentheses? Like this something(). Also, is there a way to write a function and then have it output what is going on in that function?
void findHighest(int score1, int score2, int score3, int score4, int score5, int score6)
{
int highest;
if (score1>= score2 && score1>= score3 && score1>= score4 && score1>=score5 && score1>= score6)
highest = score1;
else if (score2 >= score3 && score2>= score4 && score2>= score5 && score2>= score6)
highest = score2;
else if (score3>= score4 && score3>= score5 && score3>= score6)
highest = score3;
else if (score4>= score5 && score5>= score6)
highest = score4;
else if (score5>= score6)
highest = score5;
else
highest = score6;
}
Can I see what i'm getting for highest?