import java.util.ArrayList;
import java.util.Scanner;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int person;
System.out.println("ÐобÑого вÑемени ÑÑÑок...");
while (true) {
System.out.println("Ðа ÑколÑкиÑ
ÑаÑпÑеделÑем ÑÑеÑ? :");
// пÑинимаем ввод и пÑовеÑÑем его коÑÑекÑноÑÑÑ....
while (true) {
try {
person = scanner.nextInt();
break;
} catch (InputMismatchException ex) {
System.err.println("ÐекоÑÑекÑнÑй ввод, нÑжно ввеÑÑи ÑиÑло...");
scanner.nextLine(); // <----- advance the scanner
}
}
// ÐºÐ¾Ð½ÐµÑ Ð¿ÑовеÑки
//person=scanner.nextInt();
if (person<2) {
if (person==1) {System.out.println("Ðа одного делиÑÑ Ð±ÐµÑÑмÑÑленно...");}
else {System.out.println("ÐÑо не ÑеÑÑезно....");}
} else {
Bill bill = new Bill();
bill.start(person);
break;
}
}
}
static class Tovar {
public String name;
public float cost;
}
static class Bill{
ArrayList