From dbce745145be28195c2ce04f77b39069cba44337 Mon Sep 17 00:00:00 2001 From: valkonsky Date: Tue, 18 May 2021 23:18:24 +0300 Subject: [PATCH] lesson 2 homework --- lesson2/src/main/java/ru/gb/savilin/Main.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lesson2/src/main/java/ru/gb/savilin/Main.java diff --git a/lesson2/src/main/java/ru/gb/savilin/Main.java b/lesson2/src/main/java/ru/gb/savilin/Main.java new file mode 100644 index 0000000..220a67d --- /dev/null +++ b/lesson2/src/main/java/ru/gb/savilin/Main.java @@ -0,0 +1,49 @@ +package ru.gb.savilin; + +public class Main { + + private static boolean isEqualsInterval(int a, int b){ + if ((a+b>=10)&&(a+b<=20)){ + return true; + }else { + return false; + } + } + + private static void printNegativeOrPositive(int a){ + if (a<0){ + System.out.println("Number is negative"); + }else{ + System.out.println("Number is positive"); + } + } + + private static boolean isNegativeNumber(int a){ + if(a<0) return true; + else{ + return false; + } + } + + private static void manyStringsPrinter(String s, int counter){ + for (int i=0;i