/* 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 = 120;
int cappucinoPrice = 150;
int espressoPrice = 80;
int waterPrice = 20;
int milkPrice = 120;
boolean canBuyAnything = false;
if(moneyAmount >= cappucinoPrice) {
System.
out.
println("Вы можете купить капучино"); canBuyAnything = true;
}
if(moneyAmount >= espressoPrice) {
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("Недостаточно средств :( Учите Java и зарабатывайте много! :)"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbigi0JrQvtGE0LUt0LzQsNGI0LjQvdCwIik7CgkJCgkJaW50IG1vbmV5QW1vdW50ID0gMTIwOwoJCQoJCWludCBjYXBwdWNpbm9QcmljZSA9IDE1MDsKCQlpbnQgZXNwcmVzc29QcmljZSA9IDgwOwoJCWludCB3YXRlclByaWNlID0gMjA7CgkJaW50IG1pbGtQcmljZSA9IDEyMDsKCQkKCQlib29sZWFuIGNhbkJ1eUFueXR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