/* 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 = 200 ;
System .
out .
println ( "Вы внесли " + moneyAmount
+ " руб." ) ;
int cappucinoPrice = 150 ;
int americanoPrice = 65 ;
int LattePrice = 180 ;
int waterPrice = 20 ;
int MokkoPrice = 135 ;
boolean canBuySomething = false ;
if ( moneyAmount >= cappucinoPrice) {
System .
out .
println ( "Вы можете купить капучино" ) ; canBuySomething = true ;
}
if ( moneyAmount >= MokkoPrice) {
System .
out .
println ( "Вы можете купить Мокко" ) ; canBuySomething = true ;
}
if ( moneyAmount >= LattePrice) {
System .
out .
println ( "Вы можете купить Латте" ) ; canBuySomething = true ;
}
if ( moneyAmount >= americanoPrice) {
System .
out .
println ( "Вы можете купить американо" ) ; canBuySomething = true ;
}
if ( moneyAmount >= waterPrice) {
System .
out .
println ( "Вы можете купить воду" ) ; canBuySomething = true ;
}
if ( canBuySomething == false ) {
System .
out .
println ( "Недостаточно средств :( Учитесь программировать и будет Вам счастье!))" ) ; }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbigi0JrQvtGE0LUt0LzQsNGI0LjQvdCwIik7CgkJCgkJaW50IG1vbmV5QW1vdW50ID0gMj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