본문 바로가기
C#

뇌를 자극하는 C# 5.0 프로그래밍 연습문제 10장 3번

by JAESEONG LEE- developer 2022. 7. 26.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections;
 
namespace ee
{
    class MainApp 
    { 
        static void Main(string[] args) 
        {
 
            Stack stack = new Stack();
 
            stack.Push(1); 
            stack.Push(2); 
            stack.Push(3); 
            stack.Push(4); 
            stack.Push(5); 
 
            while (stack.Count > 0
                Console.WriteLine(stack.Pop()); 
        } 
    }
}
 
cs