0
Why does this code throw errors at me? (Fixed)
So Iâve been doing code coach and the errors are happening on the question âthatâs odd...â the code really doesnât seem to like line 17 wich is odd since there shouldnât be any error. Hope you guys can tell me whatâs wrong with this :) Code: https://code.sololearn.com/cCfG6AOMwg69/?ref=app Edit: I could fix line 17 but line 21 and 27 show an error now :/
3 Answers
+ 1
`=` and `==` are different operators.
= assigns value to left hand operand.
== compares operands for equality.
on line 17 use = for assignment
int i = 0;
0
Md. Nasif-ur-Rahman Rimon the error on 21 is fixed now but 27 is still there, the error says im using unassigned variable âsumâ
0
Md. Nasif-ur-Rahman Rimon thanks for your help its fixed now :P