![[C#] 11일차 - 77. n의 m승을 계산하는 메소드](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FFY2Pi%2FbtqVSvKy6oL%2F3WdKaQdhc7CsMzYW64sojk%2Fimg.png)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace A077_PowerMethod { class Program { static void Main(string[] args) { for (int i = 1; i
![[C#] 11일차 - 76. 두 숫자 사이의 모든 정수값을 더하는 메소드](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbn7EGq%2FbtqVOsHLEye%2FxJVJs7Fhujyz6wVJKcMkG0%2Fimg.png)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace A076_AddMethod { class Program { static void Main(string[] args) { Console.WriteLine("1부터 100까지의 합 : {0}", Add(1, 100)); Console.WriteLine("101부터 200까지의 합 : {0}", Add(101, 200)); } private static int Add(int x, int y) { int sum = 0; for(int i=x; i
![[C#] 11일차 - 75. 팩토리얼을 계산하는 메소드](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FW1pXT%2FbtqVIJDvtjt%2FlFifKgFkvJMRbOfFxptYm0%2Fimg.png)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace A075_FactorialMethod { class Program { static void Main(string[] args) { int sum = 0; for(int i=1; i
![[C#] 11일차 - 74. 피라미드 메소드](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FzRTn5%2FbtqVIKvHzZ9%2F1KtGHRfJVlEkYlUjoW4HB1%2Fimg.png)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace A074_PyramidMethod { class Program { static void Main(string[] args) { DrawPyramid(3); DrawPyramid(5); DrawPyramid(7); } static void DrawPyramid(int num) { for(int i=1; i
![[C#] 11일차 - 73. 생애계산기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FP5cSM%2FbtqVh6RTdbU%2FXPYSEmfyKiejGxyr47NnH0%2Fimg.png)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace A073_AgeCalculator { class AgeCalculator { static void Main(string[] args) { Console.WriteLine("생일을 입력하세요(yyyy/mm/dd) : "); string birth = Console.ReadLine(); string[] bArr = birth.Split('/'); // '/'를 기준으로 나눠서 배열에 저장 int bYear = int.Parse(bArr[0]); int bMonth = int.Parse(..