Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Club {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int profit = Integer.parseInt(scan.nextLine());
- String coctail = scan.nextLine();
- int price = coctail.length();
- //System.out.println(price);
- while (!"Party".equals(coctail)) {
- coctail= scan.nextLine(); // тук гърми 2-я текст
- int orders = Integer.parseInt(coctail);
- price = price + orders;
- if (price*1.0 % 2 != 0) {
- price *= 0.75;
- }
- // coctail = scan.nextLine(); // тук гърми 1-я текст
- }
- System.out.println(price);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment