public class Output { public static void showMessage(double personalPrice) { if ((int) personalPrice % 100 >= 10 && (int) personalPrice % 100 <= 20) { System.out.printf("ÐаждÑй Ñеловек должен заплаÑиÑÑ %.2f ÑÑблей", personalPrice); } else { switch ((int) personalPrice % 10) { case 1 -> System.out.printf("ÐаждÑй Ñеловек должен заплаÑиÑÑ %.2f ÑÑблÑ", personalPrice); case 2, 3, 4 -> System.out.printf("ÐаждÑй Ñеловек должен заплаÑиÑÑ %.2f ÑÑблÑ", personalPrice); default -> System.out.printf("ÐаждÑй Ñеловек должен заплаÑиÑÑ %.2f ÑÑблей", personalPrice); } } } }