Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Queue with Queue Data type
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Rextester { public class Program { public static void Main(string[] args) { //Create Queue with Queue Data type Queue que = new Queue(); que.Enqueue(2); que.Enqueue(4); que.Enqueue(6); que.Enqueue(8); printStack(que); que.Dequeue(); que.Dequeue(); printStack(que); } public static void printStack(Queue que){ Console.WriteLine("\n Queue elements"); foreach (int i in que) { Console.WriteLine(i); } Console.WriteLine("Number of elements in the stack " + que.Count); Console.WriteLine("Does queue contain the number 4 "+ que.Contains(4)); } } }
run
|
edit
|
history
|
help
0
Singleton Design Pattern
Basma 2
line 1 syntax error
test2
Salario
reversearr
HawkSearch field naming convention
UrlAccess
Vowel
axcc szxscd