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