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