Visual studio (pt2) Vending Machine
still learning to input values and the difference between int and string also = and ==
{
static void Main(string[] args)
{
Console.WriteLine("Please select your item of choice");
Console.WriteLine("A1");//goes to five or something, but all start at 1
Console.WriteLine("B2");
Console.WriteLine("C3");
string choice = Console.ReadLine();
if (choice == "A1") //or A1 to A5
{
Console.WriteLine("you have selected A1 please choose payment method");
}
string choice2 = Console.ReadLine();
if (choice == "B2") //or B1 to B5
{
Console.WriteLine("you have selected B2 please choose payment method");
}
string choice3 = Console.ReadLine();
if (choice == "C3") //or C1 to C3
{
Console.WriteLine("you have selected B2 please choose payment method");
}
}
}
}
No comments:
Post a Comment