class Program
{class Program
{
static void Main()
{
int TotalCoffeCost = 0;
Start:
Console.WriteLine("**Caffe Menu**\n\n1-Small = 1$, \n2-Medium =2$, \n3-Large");
Console.WriteLine("-------------------------------------------------------------");
int UserChoice = int.Parse(Console.ReadLine());
switch (UserChoice)
{
case 1:
TotalCoffeCost += 1;
break;
case 2:
TotalCoffeCost += 2;
break;
case 3:
TotalCoffeCost += 3;
break;
default:
Console.WriteLine("Your Choice is invalid please select the order numbers");
goto Start;
}
Decide:
Console.WriteLine("Do you want to buy another coffe - Yes or No");
string UserDecision = Console.ReadLine();
switch (UserDecision.ToUpper())
{
case "YES":
goto Start;
case "NO":
break;
default:
Console.WriteLine("Your choice {0} is invalid please try again", UserDecision);
goto Decide;
}
Console.WriteLine("Thanks for shoping with us");
Console.WriteLine("Bill Amount= {0}$",TotalCoffeCost );
}
}
static void Main()
{
int TotalCoffeCost = 0;
Start:
Console.WriteLine("**Caffe Menu**\n\n1-Small = 1$, \n2-Medium =2$, \n3-Large");
Console.WriteLine("-------------------------------------------------------------");
int UserChoice = int.Parse(Console.ReadLine());
switch (UserChoice)
{
case 1:
TotalCoffeCost += 1;
break;
case 2:
TotalCoffeCost += 2;
break;
case 3:
TotalCoffeCost += 3;
break;
default:
Console.WriteLine("Your Choice is invalid please select the order numbers");
goto Start;
}
Decide:
Console.WriteLine("Do you want to buy another coffe - Yes or No");
string UserDecision = Console.ReadLine();
switch (UserDecision.ToUpper())
{
case "YES":
goto Start;
case "NO":
break;
default:
Console.WriteLine("Your choice {0} is invalid please try again", UserDecision);
goto Decide;
}
Console.WriteLine("Thanks for shoping with us");
Console.WriteLine("Bill Amount= {0}$",TotalCoffeCost );
}
}
This is what i have done so far, i need when app starts to ask me to press enter F for Food and D for Drinks, i know already how to make menus for drinks and food like i did for coffes. please help and sorry about my english is not my native laguage. thank you