/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
System.
out.
println("Кофе-машина");
int moneyAmount = 70;
System.
out.
println("Вы внесли " + moneyAmount
+ " руб.");
int cappucinoPrice = 150;
int americanoPrice = 65;
int waterPrice = 20;
int appleJuicePrice = 45;
boolean canBuySomething = false;
if(moneyAmount >= cappucinoPrice) {
System.
out.
println("Вы можете купить капучино"); canBuySomething = true;
}
if(moneyAmount >= americanoPrice) {
System.
out.
println("Вы можете купить американо"); canBuySomething = true;
}
if(moneyAmount >= waterPrice) {
System.
out.
println("Вы можете купить воду"); canBuySomething = true;
}
if(moneyAmount >= appleJuicePrice) {
System.
out.
println("Вы можете купить яблочный сок"); canBuySomething = true;
}
if(canBuySomething == false) {
System.
out.
println("Недостаточно средств :( Изучайте Java и зарабатывайте много!))"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwogCmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwogCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU3lzdGVtLm91dC5wcmludGxuKCLQmtC+0YTQtS3QvNCw0YjQuNC90LAiKTsKIAoJCWludCBtb25leUFtb3VudCA9IDcwOwogCgkJU3lzdGVtLm91dC5wcmludGxuKCLQktGLINCy0L3QtdGB0LvQuCAiICsgbW9uZXlBbW91bnQgKyAiINGA0YPQsS4iKTsKIAoJCWludCBjYXBwdWNpbm9QcmljZSA9IDE1MDsKCQlpbn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