/* 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 = 10;
int espressoPrice = 60;
int americanoPrice = 80;
int lattePrice = 150;
int waterPrice = 20;
int milkPrice = 100;
boolean canBuyAnything = false;
if(moneyAmount >= espressoPrice)
{
System.
out.
println("Вы можете купить эспрессо"); canBuyAnything = true;
}
if(moneyAmount >= americanoPrice)
{
System.
out.
println("Вы можете купить американо"); canBuyAnything = true;
}
if(moneyAmount >= lattePrice)
{
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("Недостаточно средств!"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbigi0JrQvtGE0LUt0LzQsNGI0LjQvdCwIik7CgkJCgkJaW50IG1vbmV5QW1vdW50ID0gMTA7CgkJCgkJaW50IGVzcHJlc3NvUHJpY2UgPSA2MDsKCQlpbnQgYW1lcmljYW5vUHJpY2UgPSA4MDsKCQlpbnQgbGF0dGVQcmljZSA9IDE1MDsKCQlpbnQgd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