diff --git a/src/main/java/com/geekbrains/HomeWorkApp.java b/src/main/java/com/geekbrains/HomeWorkApp.java index fe71ef6..7efbf8a 100644 --- a/src/main/java/com/geekbrains/HomeWorkApp.java +++ b/src/main/java/com/geekbrains/HomeWorkApp.java @@ -2,6 +2,46 @@ public class HomeWorkApp { public static void main(String[] args) { - + printThreeWords(); + chekSumSign(); + printColor(); + compareNumbers(); + + } + + public static void printThreeWords() { + System.out.println("Orange"); + System.out.println("Banana"); + System.out.println("Apple"); + } + + public static void chekSumSign() { + int a=5; + int b=2; + + if((a+b) >= 0) + System.out.println("Сумма положительная"); + else + System.out.println("Сумма отрицательная"); + } + + public static void printColor() { + int value = 5; + + if (value <= 0) + System.out.println("Красный"); + else if (value > 0 && value <= 100) + System.out.println("Желтый"); + else + System.out.println("Зеленый"); + } + + public static void compareNumbers() { + int a=3; + int b=4; + if (a >= b) + System.out.println("a >= b"); + else + System.out.println("a < b"); } }