본문 바로가기
반응형

코딩테스트 준비211

백준 C# - 10798 2차원 배열 알아보러가기 C# - 2차원 배열 1. 초기화 및 값 할당 방법 int [,] = new int [3,3]; 01 초기화 구문을 사용하여 값 할당 int[,] array = new int[,]{ { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } }; 02 인덱스를 사용하여 값 할당 array[0,1] = 1; array[0,2] = 2; a code-piggy.tistory.com using System; using System.Collections.Generic; namespace baek2 { class Program { static void Main(string[] args) { string[,] array = new string[5,15]; for (i.. 2023. 5. 18.
백준 C# - 2566 2차원 배열 알아보러 가기 C# - 2차원 배열 1. 초기화 및 값 할당 방법 int [,] = new int [3,3]; 01 초기화 구문을 사용하여 값 할당 int[,] array = new int[,]{ { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } }; 02 인덱스를 사용하여 값 할당 array[0,1] = 1; array[0,2] = 2; a code-piggy.tistory.com using System; using System.Collections.Generic; namespace baek2 { class Program { static void Main(string[] args) { int max = 0; int[,] array = new int[9, 9].. 2023. 5. 17.
C# - 2차원 배열 1. 초기화 및 값 할당 방법 int [,] = new int [3,3]; 01 초기화 구문을 사용하여 값 할당 int[,] array = new int[,]{ { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } }; 02 인덱스를 사용하여 값 할당 array[0,1] = 1; array[0,2] = 2; array[0,3] = 3; array[1,1] = 4; array[1.2] = 5; array[1,3] = 6; array[2,0] = 7; array[2,1] = 8; array[2,2] = 9; 03 반복문을 사용하여 값 할당 int n = 1; for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++ ) { array[i,j.. 2023. 5. 15.
백준 C# - 2738 2차원 배열 알아보러 가기 C# - 2차원 배열 1. 초기화 및 값 할당 방법 int [,] = new int [3,3]; 01 초기화 구문을 사용하여 값 할당 int[,] array = new int[,]{ { 1 , 2 , 3 } , { 4 , 5 , 6 } , { 7 , 8 , 9 } }; 02 인덱스를 사용하여 값 할당 array[0,1] = 1; array[0,2] = 2; a code-piggy.tistory.com using System; using System.Collections.Generic; using System.Text; namespace baek2 { class Program { static void Main(string[] args) { string s = Console.Rea.. 2023. 5. 15.
백준 C# - 25206 소수점 자릿수 알아보기 2023. 5. 15.
백준 C# - 1316 StringBuilder 알아보러 가기 C# - StringBuilder String String 개체는 변경할 수 없다. System.String 클래스에서 메서드 중 하나를 사용할 때마다 메모리에 새 문자열 개체가 생성되므로, 새 개체에 대한 공간을 새로 할당 되어진다. 그러므로 문자열 code-piggy.tistory.com using System; using System.Collections.Generic; using System.Text; namespace baek2 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int count = 0; while (n>0) { n--; bool.. 2023. 5. 15.
반응형