← Java from Scratch
Lesson 13 of 88 · 5 XP
Warm-up: greater than ten? warm-up
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
if runs its block only when the condition is true, and else — when it is false:
if (n > 10) {
System.out.println("big");
} else {
System.out.println("small");
}
Task. Read an integer and print big if it is greater than 10, otherwise small.
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.