An error code popped up while trying to compile my code, saying that the variable n had not been declared earlier. It had been declared however at the beginning. Here is the code and the terminal statement.CodeCompile message. At the same time it says that my loop has an empty body, but doing research I don't know how to remedy that, as my loop clearly has a defined course.


1 Answer 1


All errors are that you end each for loop with a semicolon, delete it. By the way the screenshots are not very useful, if it were necessary to reproduce your errors, no one is going to recopy your code by hand.

  • Thanks man, will add the code in the body next time as well, sorry. Commented Jul 5, 2020 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .