Виконати ❯
❯
Запустити код
Ctrl+Alt+R
Змінити орієнтацію
Ctrl+Alt+O
Змінити тему
Ctrl+Alt+D
public class Main { public static void main(String[] args) { // Create integer variables int length = 4; int width = 6; int area; // Calculate the area of a rectangle area = length * width; // Print variables System.out.println("Length is: " + length); System.out.println("Width is: " + width); System.out.println("Area of the rectangle is: " + area); } }
Length is: 4
Width is: 6
Area of the rectangle is: 24