проблем със задача
Здравейте! Не мога да измисля правилното решение. Задачата е "Ергенско парти". import java.util.Scanner; public class BachelorPartiProbEXAM { public static void main(String[] args) { Scanner scanner = new Scanner (System.in); int singer = Integer.parseInt(scanner.nextLine()); String input = scanner.nextLine(); int sumMoney = 0; int moneyFromGroup = 0; while (!input.equals("The restaurant is full")) { if (groupOfPeople >= 5) { moneyFromGroup = groupOfPeople * 70; sumMoney = sumMoney + moneyFromGroup; } else { moneyFromGroup = groupOfPeople * 100; sumMoney = sumMoney + moneyFromGroup; } } if (singer > sumMoney){ int left = singer - sumMoney; System.out.printf("You have %d guests and %d leva left.", groupOfPeople, left); } else { int incomeMoney = sumMoney - singer; System.out.printf("You have %d guests and %d leva income, but no singer.", groupOfPeople, incomeMoney); } } }