From 41121df2efb46c331f541121d336b9121ed8aa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=98=95=EC=97=B0=20=ED=95=A8?= Date: Tue, 29 Jun 2021 10:31:30 +0900 Subject: [PATCH] =?UTF-8?q?#26=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CSBasic5/Program.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/CSBasic5/Program.cs b/CSBasic5/Program.cs index 7a71186..795e3ae 100644 --- a/CSBasic5/Program.cs +++ b/CSBasic5/Program.cs @@ -4,9 +4,31 @@ namespace CSBasic5 { class Program { + class MethodExample + { + public int Power(int x) + { + return x * x; + } + + public int Multi(int x, int y) + { + return x * y; + } + + public void Print() + { + Console.WriteLine("Print() 메서드 호출됨"); + } + } static void Main(string[] args) { - Console.WriteLine("Hello World!"); + MethodExample me = new MethodExample(); + Console.WriteLine(me.Power(10)); + Console.WriteLine(me.Power(20)); + Console.WriteLine(me.Multi(52, 273)); + Console.WriteLine(me.Multi(103, 32)); + me.Print(); } } }