Oo, or meron site mga programmer doon nagtatanong eh. Di ko tanda kung ano pangalan nung site na yun doon nalang sana mag tanong si ts lalo na puro programmer mga tumatambay doon.
Yup spamming na ginagawa mo kugn apulit ulit ka sa tanong mo. Fifo lang nman yan kaya mo na yan. mas mahihirapan ka kung di mo maiintindihan yan kasi pahirap ng pahirap yan
Pa help naman po. Pa guide po. Please. Hirap lang po tlaga sa online class at. Wala pong ka close na matatanungan po. Salamat po. Sana ma help nyoko. Btw first year college po ako. Salamat po
Queue<string> queue = new Queue<string>();
start:
System.Console.WriteLine();
System.Console.WriteLine("===========");
System.Console.WriteLine("Queue Menu:");
System.Console.WriteLine("===========\n");
System.Console.WriteLine("[1] Add an element");
System.Console.WriteLine("[2] Remove front element");
System.Console.WriteLine("[3] Search an element");
System.Console.WriteLine("[4] Display all elements");
System.Console.WriteLine("[5] Exit");
System.Console.WriteLine();
choices:
System.Console.WriteLine();
System.Console.Write("Enter your choice > ");
var input = int.Parse(Console.ReadLine());
System.Console.WriteLine();
switch (input)
{
case 1:
System.Console.Write("Enter an item to add to queue > ");
var item = System.Console.ReadLine();
foreach (var i in item.Split(','))
{
queue.Enqueue(i);
}
System.Console.WriteLine($"{item} has been added to queue. Total: {queue.Count}");
goto choices;
case 2:
var deq = queue.Dequeue();
System.Console.WriteLine($"{deq} has been removed to queue");
goto choices;
case 3:
System.Console.Write("Enter an item to search > ");
var searchItem = Console.ReadLine();
var result = queue.FirstOrDefault(x => x.Contains(searchItem));
System.Console.WriteLine($"Found {result}");
goto choices;
case 4:
System.Console.WriteLine($"Queue Items {queue.Count}:");
foreach(var q in queue){ System.Console.WriteLine($"{q}");}
goto choices;
case 5:
goto start;
}
Queue<string> queue = new Queue<string>();
start:
System.Console.WriteLine();
System.Console.WriteLine("===========");
System.Console.WriteLine("Queue Menu:");
System.Console.WriteLine("===========\n");
System.Console.WriteLine("[1] Add an element");
System.Console.WriteLine("[2] Remove front element");
System.Console.WriteLine("[3] Search an element");
System.Console.WriteLine("[4] Display all elements");
System.Console.WriteLine("[5] Exit");
System.Console.WriteLine();
choices:
System.Console.WriteLine();
System.Console.Write("Enter your choice > ");
var input = int.Parse(Console.ReadLine());
System.Console.WriteLine();
switch (input)
{
case 1:
System.Console.Write("Enter an item to add to queue > ");
var item = System.Console.ReadLine();
foreach (var i in item.Split(','))
{
queue.Enqueue(i);
}
System.Console.WriteLine($"{item} has been added to queue. Total: {queue.Count}");
goto choices;
case 2:
var deq = queue.Dequeue();
System.Console.WriteLine($"{deq} has been removed to queue");
goto choices;
case 3:
System.Console.Write("Enter an item to search > ");
var searchItem = Console.ReadLine();
var result = queue.FirstOrDefault(x => x.Contains(searchItem));
System.Console.WriteLine($"Found {result}");
goto choices;
case 4:
System.Console.WriteLine($"Queue Items {queue.Count}:");
foreach(var q in queue){ System.Console.WriteLine($"{q}");}
goto choices;
case 5:
goto start;
}
welcome lang. Aral lang ng mabuti. Ako di ako natutuo sa school kundi natuto lang with self learning with the help of google and stackoverlow. Hindi lahat ng question mo masasagot dito kaya need mo rin mag explore via searching.
welcome lang. Aral lang ng mabuti. Ako di ako natutuo sa school kundi natuto lang with self learning with the help of google and stackoverlow. Hindi lahat ng question mo masasagot dito kaya need mo rin mag explore via searching.
welcome lang. Aral lang ng mabuti. Ako di ako natutuo sa school kundi natuto lang with self learning with the help of google and stackoverlow. Hindi lahat ng question mo masasagot dito kaya need mo rin mag explore via searching.