Original Question and Answer
If we add the R console:
if (1 > 0) {
cat("1\n");
}
else {
cat("0\n");
}
why doesn't it work?
R - , R- . ( by @JohnColeman: . , Python , . , R, , , (, , ).)
if (1 > 0) {
cat("1\n");
}
, . ,
else {
cat("0\n");
}
, , , else.
:
if (1 > 0) {
cat("1\n");
} else {
cat("0\n");
}
.
, C, . "" .
, ,
! {} . , R,
{statement_1; statement_2; ...; statement_n;}
, statement_n.
:
{
if (1 > 0) {
cat("1\n");
}
else {
cat("0\n");
}
}
1.
{} , - , }. , , {}.