Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
stack with stack 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 stack with stack Data type Stack st = new Stack(); st.Push(2); st.Push(4); st.Push(6); st.Push(8); printStack(st); st.Pop(); st.Pop(); printStack(st); } public static void printStack(Stack st){ Console.WriteLine("\n Stack elements"); foreach (int i in st) { Console.WriteLine(i); } Console.WriteLine("Number of elements in the stack " +st.Count); Console.WriteLine("Does stack contain the number 6 "+st.Contains(6)); } } }
run
|
edit
|
history
|
help
0
Test Daylight Savings
XML filtering example
c# integers
Simple Selection Sort
aaaaa
,
Fórum regex only alphanumerics (except underscore)
Generics Base class constraints Doubts
code1
sdfghuyhtgrfedwsx