Write a user-defined function that calculates grade point average (GPA) on a scale of 0 to 4 ...
The Attempt at a Solution
I'm getting the error that "function definitions are not permitted in this context"
And details says "A nested function cannot be defined in a control statement"
I don't really understand how to use functions. What can I do to fix this?
Oh and I took out that extra "end"
Last edited by a moderator: