+ 1
What are errors in this
if(code>1); a=b+c else a=0
2 Respuestas
+ 3
forgot semicolons ?
+ 1
You have a semicolon after the if statement but nowhere else. You also have not defined a, b, or c. Here is a correct version
int a, b, c;
// give b and c values
if (code > 1)
a = b + c;
else
a = 0;
You should also put braces around your if statements, but it's not required.
int a, b, c;
// give b and c values
if (code > 1) {
a = b + c;
} else {
a = 0;
}