Ask coding questions

← Back to all posts
What is wrong with my code?
KarthikNuti (0)

Can anyone help me fix my simple code for a grade calculator? Every time I fix it and it runs it says error. I believe there are no more errors. So can anyone roof read my code thank you?

mat1 (3261)

The error traceback tells you what and where the error is. error: ';' expected
    int grades = in.nextInt()
                             ^ error: illegal start of statement
    if ( grades >= 90)
2 errors

In, there seem to be a lot of issues. Since it doesn't look like you're using that file, you should delete it.
Please mark this comment as the answer if it helped you. Thanks!