// dev branch for Y.Practicum import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Ðа ÑколÑÐºÐ¸Ñ Ñеловек поделиÑÑ ÑÑÑÑ?"); while (true) { if (!scanner.hasNextInt()) { System.out.println("ÐÑибка, введÑн ÑекÑÑ\nÐведиÑе ÑиÑловое знаÑение"); scanner.nextLine(); } else { int people = scanner.nextInt(); if (people == 1) { System.out.println("ÐаÑем Ñебе делиÑÑ ÑÐ²Ð¾Ñ ÐµÐ´Ñ?\nÐведиÑе дÑÑгое колиÑеÑÑво"); } if (people < 1) { System.out.println("РположиÑелÑнÑÑ Ð´ÑÑзей Ñ ÑÐµÐ±Ñ Ð½ÐµÑ?\nÐведиÑе положиÑелÑное ÑиÑло"); } if (people > 1) { System.out.println("Ðавай ÑÑиÑаÑÑ"); GroceryList groceryList = new GroceryList(); groceryList.product(people); break; } } } } }