0
Why this code show warning ?
Warning in last "for đ" https://code.sololearn.com/c8yUH94wtkZg/?ref=app
2 Answers
+ 5
Well, the compiler kindly told you why, didn't it :) Line 26, in the for loop header. There you combine two conditions with a comma. That causes the evaluation of the first expression to be discarded, which is not what you want. You want both conditions to be true. For that you need to use the AND operator: &&
Line 26: i <= n && j < n
+ 2
Ohh thanks alot Ani Jona đ