29 Сен в 10:22
14 +1
0
Ответы
1

It looks like you pasted a partial conditional block. A few things to check:

An else must follow an if (or else-if). Make sure you have a matching if above.Most C-family languages (JavaScript, Java, C, C++, C#, etc.) require a semicolon after the statement: x += 3;Make sure braces are balanced (you opened/closed the right blocks).

Examples (choose the language you’re using):

JavaScript / Java / C / C++ / C#:
if (condition) {
// ...
} else {
x += 3;
}

One-line style (still needs semicolon):
if (condition) doSomething(); else x += 3;

Python (no braces, indentation matters):
if condition:

...

else:
x += 3

If you tell me which language and the surrounding code (the if block or more lines), I can give a corrected version.

29 Сен в 10:51
Не можешь разобраться в этой теме?
Обратись за помощью к экспертам
Гарантированные бесплатные доработки в течение 1 года
Быстрое выполнение от 2 часов
Проверка работы на плагиат
Поможем написать учебную работу
Прямой эфир