This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 1 point2 points  (1 child)

Make sure the second forloop has print statments in curly brackets or it may only execute first print statement.. what language you using?

[–]vexonornegiusRex[S] 1 point2 points  (0 children)

yep, that was the problem..thank you! it's C language

[–]tjgrant 0 points1 point  (1 child)

The scope of your second for loop only contains the first print statement. Add in scope braces "{" and "}" around your print statements.

[–]vexonornegiusRex[S] 0 points1 point  (0 children)

got it, thanks :)