public static void Main()
Console.WriteLine("Welcome to the Smart Vending Machine, here are our products:");
Console.WriteLine("A: Lemon Juice - 50 Pesos");
Console.WriteLine("B: Apple Juice - 35 Pesos");
Console.WriteLine("C: Orange Juice - 40 Pesos");
Console.WriteLine("D: Grape Juice - 45 Pesos");
Console.WriteLine("What would you like to purchase? (Please use the letters mentioned to indicate the product)");
product = Convert.ToString(Console.ReadLine());
if (product != "A" && product != "B" && product != "C" && product != "D" && product != "a" && product != "b" && product != "c" && product != "d")
Console.WriteLine("Please input an available item");
Console.WriteLine("How much of this product do you wish to purchase?");
product_amount = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please input a number higher than 0");
Console.WriteLine("How much money would you like to use to purchase the product?");
your_money = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Please input a number higher than 0");
if (product == "A" || product == "a")
int sumA = (50 * product_amount);
double sumA2 = (your_money - sumA);
Console.WriteLine("Your change is " + sumA2 + " pesos, enjoy your drink!");
Console.WriteLine("Sorry, you cannot purchase the item. Your funds have been returned to you.");
Console.WriteLine("You have paid the exact amount for the transaction, enjoy your drink!");
else if (product == "B" || product == "b")
int sumB = (35 * product_amount);
double sumB2 = (your_money - sumB);
Console.WriteLine("Your change is " + sumB2 + " pesos, enjoy your drink!");
Console.WriteLine("Sorry, you cannot purchase the item. Your funds have been returned to you.");
Console.WriteLine("You have paid the exact amount for the transaction, enjoy your drink!");
else if (product == "C" || product == "c")
int sumC = (40 * product_amount);
double sumC2 = (your_money - sumC);
Console.WriteLine("Your change is " + sumC2 + " pesos, enjoy your drink!");
Console.WriteLine("Sorry, you cannot purchase the item. Your funds have been returned to you.");
Console.WriteLine("You have paid the exact amount for the transaction, enjoy your drink!");
else if (product == "D" || product == "d")
int sumD = (45 * product_amount);
double sumD2 = (your_money - sumD);
Console.WriteLine("Your change is " + sumD2 + " pesos, enjoy your drink!");
Console.WriteLine("Sorry, you cannot purchase the item. Your funds have been returned to you.");
Console.WriteLine("You have paid the exact amount for the transaction, enjoy your drink!");