0% found this document useful (0 votes)
11 views

While Loop

Uploaded by

Angel Limbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

While Loop

Uploaded by

Angel Limbo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

using System;

namespace while_loop
{
class Program
{
static void Main(string[] args)
{

Console.WriteLine("Hi! Welcome ! There's a lot of FOOD here for you,


please enter the number of the food that you want:");
Console.WriteLine("1] HOT-SI-LOG");
Console.WriteLine("2] LONG-SI-LOG");
Console.WriteLine("3] TO-SI-LOG");
Console.WriteLine("4] SAR-SI-LOG");
Console.WriteLine("5] EXIT");
Console.Write("PLEASE ENTER YOUR ORDER # : ");
int x = Convert.ToInt32(Console.ReadLine());

while (x == 1)
{
Console.WriteLine("YOU HAVE ORDERED: {0} ] - HOTDOG SINANGAG
ITLOG", 1);
Console.WriteLine("THANK YOU FOR COMING!");
break;
}

while (x == 2)
{
Console.WriteLine("YOU HAVE ORDERED: {0} ] - LONGGANISA SINANGAG
ITLOG", 2);
Console.WriteLine("THANK YOU FOR COMING!");
break;
}

while (x == 3)
{
Console.WriteLine("YOU HAVE ORDERED: {0} ] - TOCINO SINANGAG
ITLOG", 3);
Console.WriteLine("THANK YOU FOR COMING!");
break;
}

while (x == 4)
{
Console.WriteLine("YOU HAVE ORDERED: {0} ] - SARDINAS SINANGAG
ITLOG", 4);
Console.WriteLine("THANK YOU FOR COMING!");
break;
}

while (x == 5)
{
Console.WriteLine("UWI NA SA BAHAY NA LANG KUMAIN");
Console.WriteLine("THANK YOU FOR USING THIS PROGRAM. GOODBYE");
break;
}

}
}
}

You might also like