목록언어/CS (4)
Dailelog

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; /* * Recursive FUnction(재귀함수) * * 어떠한 함수 정의 내에서 자기 자신 함수 호출 * ex) * void f() * { * ..... * f(); * ..... * } * * 분할 정복(divide & conquer) 방식의 문제해결기법 * n개의 문제 -> 1개의 문제 + (n-1)개으 ㅣ문제 * n개의 문제 -> n/2개의 문제 + n/2개의 문제 * n개의 문제 -> n/4개의 문제 + n/4개의 문제+ n/4개의 문제 +n/4개의 문제 * * 단점: 속도 느림 / 기억..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; /* * built-int type 변수 특징 * -의미: 정수를 저장하는 거억장소 * -목적: 셀수 있는 숫자 저장 * 학생수, 지갑의 돈, 자동차 수 소수점 없음 * -상수: 1234. 0x7f12. 0755 * -크기: 4바이트 * -표형양식: 양수경우/음수경우 * -연산자: +-* %(modulo operator) * -주의사항: overflow / truncation * -short(ushort):2 bytes * -long(ulong: 8bytes * * 문자형 변수(character va..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 부산시 { class 동래구 { //visibility(가시성) // 동래구라는 class를 다른 namespace또는 class에서 사용하려면 public을 해주어야 한다. public static string wherAreYou() { return "부산시/동래구/사직동"; } public static int add(int x, int y) { return x + y +100; } } class Program { static int add(int x, int y) { return..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; // 강의 주제 : C로 작성된 getSum() 함수를 C#으로 만들어 보기 // //자동할당 복습 //namespace : namespace안에는 여러개의 클래스를 포함할수 있다. //class //command line argument: 고급C프로그래밍 - 12-2-2차원 배열 동적 할당 //command line argument 는 argc,argv와 같음 // ex) //main(int argc,char* argv[]) //{ //} // C#에서 함수는 두가지로 나누어진다. //static ..