/* 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 = 150;
int espressoPrice = 80;
int cappucinoPrice = 150;
int waterPrice = 20;
int milkPrice = 40;
boolean canBuyAnything = false;
if(moneyAmount >= 1){
System.
out.
println("Вы можете купить"); canBuyAnything = true;
}
if(moneyAmount >= espressoPrice) {
System.
out.
println("- эспрессо"); canBuyAnything = true;
}
if(moneyAmount >= cappucinoPrice) {
System.
out.
println("- капучино"); canBuyAnything = true;
}
if(moneyAmount >= waterPrice) {
canBuyAnything = true;
}
if(moneyAmount >= milkPrice) {
System.
out.
println("- молоко"); canBuyAnything = true;
}
if(canBuyAnything == false) {
System.
out.
println("Недостаточно средств"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwogCmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwogCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU3lzdGVtLm91dC5wcmludGxuKCI8PSDQmtC+0YTQtS3QvNCw0YjQuNC90LAgPT4iKTsKIAoJCWludCBtb25leUFtb3VudCA9IDE1MDsKIAoJCWludCBlc3ByZXNzb1ByaWNlID0gODA7CgkJaW50IGNhcHB1Y2lub1ByaWNlID0gMTUwOwoJCWludCB3YXRlclByaWNlID0gMjA7CgkJaW50IG1pbGtQcmljZSA9IDQwOwogCgkJYm9vbGVhbiBjYW5CdXlBbnl0aGluZyA9IGZhb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