/* 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 greatWisckyPrice = 10;
boolean canBuySomething = false;
if(moneyAmount >= cappucinoPrice) {
System.
out.
println("Вы можете купить капучино"); canBuySomething = true;
}
if(moneyAmount >= espressoPrice) {
System.
out.
println("Вы можете купить эспрессо"); canBuySomething = true;
}
if(moneyAmount >= waterPrice) {
System.
out.
println("Вы можете купить воду"); canBuySomething = true;
}
if(moneyAmount >= greatWisckyPrice) {
System.
out.
println("Вы можете купить вискарик"); canBuySomething = true;
}
if(canBuySomething == false) {
System.
out.
println("Недостаточно средств :( Изучайте Java и пейте виски!))"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbigi0JrQvtGE0LUt0LzQsNGI0LjQvdCwIik7CgkJCgkJaW50IG1vbmV5QW1vdW50ID0gMTIwOwoJCQoJCWludCBjYXBwdWNpbm9QcmljZSA9IDE1MDsKCQlpbnQgZXNwcmVzc29QcmljZSA9IDgwOwoJCWludCB3YXRlclByaWNlID0gMjA7CgkJaW50IGdyZWF0V2lzY2t5UHJpY2UgPSAxMDsKCQkKCQlib29sZWFuIGNhb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