You're not calling your functions anywhere within main(). It's simply outputting your input all in a row, as that's all you've asked it to do.
You need to name your functions better. Ave is finding a sum, and out is finding the average. That's confusing to anyone trying to read your code (especially your professor).
Your other functions operate on doubles. Since S1,S2,S3 are being passed in as integers in the "out" function, if you pass in a double value, it's going to be truncated down to an integer, so 16.4 would become 16, etc. To make matters worse, on line 42, you're summing 3 integers and dividing by an integer, which no matter what type "Grade" is, you'll get an integer response. So for S1+S2+S3 < 300, you'll get zero for a grade.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
> Not sure how to flag as answered!!
Just click the link "Mark this thread as solved" at the bottom where it says "Has this thread been answered?"
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847