전체 글143 [알고리즘] 2차원 배열을 이용하여 해당 년도의 월 일을 입력하면 해당년도부터 며칠 째인지 알려주는 프로그램 2차원 배열을 이용하여 해당 년도의 월 일을 입력하면 해당년도부터 며칠 째인지 알려주는 프로그램 using System; using System.Diagnostics; using System.Text; namespace ConsoleApp4 { class Program { public static int[,] mdays =new int[,] { { 31,28,31,30,31,30,31,31,30,31,30,31}, //평년 { 31,29,31,30,31,30,31,31,30,31,30,31} //윤년 }; //해당 년도는 윤년인가?(윤년 true / 평년 false) static int isLeap(int year) { return (year % 4 == 0 && year % 100 != 0 || yea.. 2020. 4. 12. [C#] LINQ group by 사용하기 group by로 데이터 분류하기 DB group by 와 비슷한 역할을 수행합니다. group by 의 형식 group A by B into C 예시 : using System; using System.Diagnostics; using System.Collections; using System.Linq; namespace ConsoleApp3 { class Student { public string Name { get; set; } public int Score { get; set; } } class Program { static void Main(string[] args) { Student[] arrStudent = { new Student(){Name="홍길동",Score=90}, new Stude.. 2020. 4. 9. [C#] LINQ 란 무엇인가? Linq Language INtegrated Query의 약자로 C#언어에 통합된 데이터 질의 기능을 말한다. Linq 의 기본 : from, where, orderby, select 사용법 예시 : class Student { public string Name { get; set; } public int Score { get; set; } } class Program { static void Main(string[] args) { Student[] arrStudent = { new Student(){Name="홍길동",Score=90}, new Student(){Name="홍이동",Score=80}, new Student(){Name="김일동",Score=70}, new Student(){Name="박.. 2020. 4. 1. [C#] 우아한 프로퍼티 , get set C#에서는 getter setter를 쉽게 사용할수 있다. public class Student{ public string Name { get; set; } public string PhoneNumber { get; set; } } 2020. 3. 26. [알고리즘] 프로그래머스 Level1 - 모의고사 using System; using System.Collections.Generic; public class Solution { public int[] solution(int[] answers) { int[] answer = new int[] {}; int [] people_1 = new int[]{1,2,3,4,5}; int [] people_2 = new int[]{2,1,2,3,2,4,2,5}; int [] people_3 = new int[]{3,3,1,1,2,2,4,4,5,5}; int [] cnt = new int[]{0,0,0}; for(int i=0;i 2020. 3. 24. [후기] '겸손한 개발자가 만드는 거만한 소프트웨어' 를 읽고 나서 2020. 3. 22. [후기] '뇌를 움직이는 메모'를 읽고 나서 2020. 3. 22. [후기] '게임프로그래머로 산다는것' 을 읽고 나서 2020. 3. 22. [C#] 공부 정리 2020. 3. 22. [알고리즘] 프로그래밍 알고리즘 공부 정리 출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges 2020. 3. 22. [알고리즘] 프로그래머스 Level1 - 수박수박수박수박수박수? public class Solution { public string solution(int n) { string answer = ""; for(int i=1; i 2020. 3. 22. 이전 1 ··· 9 10 11 12 다음 반응형