0
Reorder the code to declare a Queue of integers, add values 1 through 5 and print the contents of the Queue.
1 q.Enqueue(x); 2 for (int x = 1; x <= 5; x++) 3 Console.Write(val + " "); 4 foreach (int val in q) 5 Queue<int> q = new Queue<int>();
2 Réponses
+ 3
Answer:
1 Queue<int> q = new Queue<int>();
2 for (int x = 1; x <= 5; x++)
3 q.Enqueue(x);
4 foreach (int val in q)
5 Console.Write(val + " ");
0
Are you asking or giving task. If you are giving task to do it then please this is not the right place for such type of things.
Please check this once.
https://www.sololearn.com/discuss/1316935/?ref=app