Imports Microsoft.VisualBasic
Dim PizzaPrice As Integer
Dim CardNumber As Integer
Dim LenCardNumber As Integer = Len(CardNumber)
Console.WriteLine("Hello Customer, welcome to Burn your mouth Pizza. Co! What Pizza would you like to order?")
Selection = Console.ReadLine()
Console.WriteLine("You have chosen a Cheese and Tomato Pizza")
Else If Selection = 2 Then
Console.WriteLine("You have Chosen a Hawaian Pizza")
Else If Selection = 3 Then
Console.WriteLine("You have chosen a BBQ Chicken Pizza")
Else If Selection = 4 Then
Console.WriteLine("You have chosen a Meat Feast Pizza")
Else If Selection = 5 Then
Console.WriteLine("You have chosen a Hot 'n' Spicy Pizza")
Console.WriteLine("This is not a valid selection. Please choose something else")
Console.WriteLine("What Pizza would you like to order?")
Selection = Console.ReadLine()
Console.WriteLine("You have chosen a Cheese and Tomato Pizza")
Else If Selection = 2 Then
Console.WriteLine("You have Chosen a Hawaian Pizza")
Else If Selection = 3 Then
Console.WriteLine("You have chosen a BBQ Chicken Pizza")
Else If Selection = 4 Then
Console.WriteLine("You have chosen a Meat Feast Pizza")
Else If Selection = 5 Then
Console.WriteLine("You have chosen a Hot 'n' Spicy Pizza")
Console.WriteLine("How many miles away do you live from our store?")
Distance = Console.ReadLine()
Console.WriteLine("You are eligible for a 10% discount and free delivery!")
TotalCost = (PizzaPrice * 90 / 100)
Console.WriteLine("The Price of your Pizza is £" & TotalCost)
Else If Distance > 3 Then
Console.WriteLine("You aren't eligible for a 10% discount or free delivery unfortunately!")
TotalCost = (PizzaPrice * 1) + 2
Console.WriteLine("The price of your Pizza is £" & TotalCost)
Console.WriteLine("What is your name?")
Name = Console.ReadLine()
Console.WriteLine(Name & ", What is your address, including postcode?")
Address = Console.ReadLine()
Console.WriteLine("One last question, what is your Credit Card Number?")
CardNumber = Console.ReadLine()
If Len(CardNumber) = 4 Then
Console.WriteLine("Alright, Payment has come through, your Pizza will be delivered in approximately 30 minutes!")
Console.WriteLine("Oops! Something went wrong with your card payment! Please Try again!")
Function TotalPrice(ByVal PizzaPrice As Integer, ByVal Distance As Integer)