0
How can i fix the errors?
5 odpowiedzi
+ 1
- you declared mark2 as a double and you're using it next as an array mark2[i].
- you defined the method to return int but the return is of type string ("A+" is a string) so the the method should be : string checkGrade().
* switch () can't be a float. it has to be int or char or enum
+ 1
Thanks
0
are you trying to check multiple grades or just one?
0
Just one
0
if only one grade, better get rid of for loop it's useless, and mark2 variable just use mark1 as it's passed to the method.
then use if else statements instead of switch.
it doesn't have to be that complicated.