/* 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 = 70;
System.
out.
println("Вы внесли " + moneyAmount
+ " руб.");
int cappucinoPrice = 150;
int americanoPrice = 65;
int waterPrice = 20;
int milkPrice = 55;
boolean canBuySomething = false;
if(moneyAmount >= cappucinoPrice) {
System.
out.
println("Вы можете купить капучино"); canBuySomething = true;
}
if(moneyAmount >= americanoPrice) {
System.
out.
println("Вы можете купить американо"); canBuySomething = true;
}
if(moneyAmount >= waterPrice) {
System.
out.
println("Вы можете купить воду"); canBuySomething = true;
}
if(moneyAmount >= milkPrice) {
System.
out.
println("Вы можете купить молоко"); canBuySomething = true;
}
if(canBuySomething == false) {
System.
out.
println("Недостаточно средств :( Изучайте Java и зарабатывайте много!))"); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbigi0JrQvtGE0LUt0LzQsNGI0LjQvdCwIik7CgkJCgkJaW50IG1vbmV5QW1vdW50ID0gNzA7CgkJCgkJU3lzdGVtLm91dC5wcmludGxuKCLQktGLINCy0L3QtdGB0LvQuCAiICsgbW9uZXlBbW91bnQgKyAiINGA0YPQsS4iKTsKCQkKCQlpbnQgY2FwcHVjaW5vUHJpY2UgPSAxNTA7Cg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