Hello all, I am stuck with my homework and not sure what to do.
We are to build a program that asks the user for a class title and then a grade for that class in letter form, then asks the user if they wish to continue. They are to be able to do this as many times as they would like. When they are done entering grades for different classes, they are to be shown their overall GPA. I am stuck and not sure where my mistake is. It keeps showing the GPA as 0. Any help would be great. Thanks!
You need to include break; statements in your switch. Also, you should also set the number to a 4.0 if someone enters 'a'. Right now, you're only doing it for the uppercase letters.
Thanks hyperfine. I included the break; statements and added the case statements.
My issue is that the math isn't working and I don't know why. I have changed totalgrade to double from int, and numgrade and totalGPA are now double also. Honestly I am lost as to why the math isn't working. Any suggestions?