How to solve this?


#1


#2

Problem in expression

i<=2n

maybe you meen

i <= 2 * n

?


#3

This expression is error.

i<=2n

#4

Please do not use such large screenshots for illustrating an error. It is hard to read, especially in browser on a smaller window size.

From what I can see, in your code you have a compiler error on the expression “2n”.
That is not legal syntax. I guess you want to express “2 times n”, which you write down as “2 * n” in most programming languages.