/* 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
{
	public static void main (String[] args) throws java.lang.Exception
	{
		System.out.println("<<Машына с напиткоми>>");
 
		int moneyAmount = 1000;   //ваш кошелек
 
		int cappucinoPrice = 140;
		int lattePrice = 120;
		int appleJuicePrice = 40;
		int milkPrice =50;
        
        String drinks[] = {"капучино", "латте", "яблочный сок", "молоко"}; //вывод напитков на экран
		Integer prices[] = {140, 120, 40, 50};  //вывод цен
		
		for(int i = 0; i < 4; i = i + 1) //вывод напитков + цен
		{
			System.out.println("Цена" + ":" + drinks[i] + " - " + prices[i]);
		}
		
		boolean canBuyAnything = false;
 
		if(moneyAmount >= cappucinoPrice) {
			System.out.println("Вы можете купить капучино");
			canBuyAnything = true;
		}
 
		if(moneyAmount >= lattePrice) {
			System.out.println("Вы можете купить латте");
			canBuyAnything = true;
		}
 
		if(moneyAmount >= appleJuicePrice) {
			System.out.println("Вы можете купить яблочьный сок");
			canBuyAnything = true;
		}
		
		if(moneyAmount >= milkPrice) {
			System.out.println("Вы можете купить молоко");
			canBuyAnything = true;
		}
		
		System.out.println("Пейте на здоровье!");
 
		if(canBuyAnything == false) {
			System.out.println("Недостаточно средств! Учите джаву и идите работать!"); //выводится если нет средств не на один напиток
			
	}
  }
}