Find answers, ask questions, and connect with our <br>community around the world.

Tagged: 

  • Nishant

    Member
    August 30, 2023 at 9:53 am

    Hello Baybarskahn,

    There is some formatting issue due to which the code is not properly displayed within the browser. In this case, the integer variable a (int a) is declared inside the for loop. The scope of this variable is within the loop. Therefore, if you try to print its value by accessing it outside the for loop it will result in a compilation error. Please refer to the attached screenshot for the code. Code Snippet

  • AbdulKadir

    Member
    August 30, 2023 at 12:41 pm

    Thanks a lot.

    Best regards.

Log in to reply.

error: Content is protected !!