Professional Documents
Culture Documents
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
class Program
start:
product_name[0] = "BARBECUE";
product_name[1] = "ORANGE";
product_name[2] = "BALUT";
float total, change, price_bbq = 10, price_orange = 8, price_balut = 15, price_icecream = 20;
menu:
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("\t\t\t\t\t\tAYAS FOODIE");
Console.Write("\n \n");
Console.ForegroundColor = ConsoleColor.DarkGreen;
Console.Write("\t\tPRODUCT \t");
Console.WriteLine("\t \t PRICE");
Console.Write("\n \n");
Console.ForegroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.Blue;
inputchoice = int.Parse(Console.ReadLine());
if (inputchoice == 1)
back1:
Console.Write("\t\t\t\t\tPRICE"); Console.Write("\t\t\tQUANTITY\n");
Console.Write(product_name[0]);
Console.SetCursorPosition(40, 13 + x);
Console.SetCursorPosition(64, 13 + x);
x += 2;
try
quantity_bbq = int.Parse(Console.ReadLine());
catch
{
goto back1;
qtty_totalbbq += quantity_bbq;
if (inputchoice == 2)
Console.Write("\t\t\t\t\tPRICE"); Console.Write("\t\t\tQUANTITY\n");
Console.Write(product_name[1]);
Console.SetCursorPosition(40, 13 + x);
Console.SetCursorPosition(64, 13 + x);
quantity_orange = int.Parse(Console.ReadLine());
qtty_totalorange += quantity_orange;
x += 2;
if (inputchoice == 3)
Console.Write("\t\t\t\t\tPRICE"); Console.Write("\t\t\tQUANTITY\n");
Console.Write(product_name[2]);
Console.SetCursorPosition(40, 13 + x);
Console.SetCursorPosition(64, 13 + x);
quantity_balut = int.Parse(Console.ReadLine());
qtty_totalbalut += quantity_balut;
x += 2;
}
if (inputchoice == 4)
Console.Write("\t\t\t\t\tPRICE"); Console.Write("\t\t\tQUANTITY\n");
Console.Write(product_name[3]);
Console.SetCursorPosition(40, 13 + x);
Console.SetCursorPosition(64, 13 + x);
quantity_icecream = int.Parse(Console.ReadLine());
qtty_totalicecream += quantity_icecream;
x += 2;
Console.WriteLine("\t\t\t\t\tOut of Stock");
x += 3;
goto choice;
choice1:
Console.Write("\n\n");
choice = Console.ReadLine();
x += 13;
goto menu;
Console.Clear();
Console.WriteLine("\t\t\t\t\t\tCHECKOUT");
Console.Write("\n \n");
if (qtty_totalbbq != 0)
Console.WriteLine("\t\t\t" + total_bbq);
if (qtty_totalorange != 0)
{
Console.WriteLine("\t\t\t" + total_orange);
if (qtty_totalbalut != 0)
Console.WriteLine("\t\t\t" + total_balut);
if (qtty_totalicecream != 0)
Console.WriteLine("\t\t\t" + total_icecream);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("_____________________________________________________________________
_____________________________\n");
Console.WriteLine();
Console.WriteLine("\n\n\n\n\n\n\n\n\n");
choice2 = Console.ReadLine();
Console.Clear();
goto start;
else
x += 1;
goto choice1;
Console.ReadKey();
}
}