반응형 코딩테스트 준비/백준 C#161 백준 C# 2908 using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string trim_input = input.Trim(); string[] token = trim_input.Split(); string first = token[0]; string second = token[1]; char[] first_answer = new char[3]; char[] second_answer = new char[3]; int j = 2; for(int i = 0; i int.Parse(second_answer)) { Console.WriteLine(first_answer);.. 2023. 4. 26. 백준 C# 1152 String 메서드 알아보러 가기 C# - String (찾기, 변형, 분할, 제거 메서드) 1. 찾기 01 Contains 특정 문자열이 문자열안에 있는지 확인 public bool Contains (string value); 반환 Boolean : 문자열이 있으면 true 없으면 false 를 반환한다. string name = "Pink Pig"; bool found = name.Contains("Pink"); Con code-piggy.tistory.com using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string trim_input =.. 2023. 4. 26. 백준 C# 10809 아스키코드 알아보러 가기 C# - 아스키코드(정수를 문자로, 문자를 정수로) 0. 아스키코드 표 출처 : https://www.asciitable.com/ 1. Char to Int 01 int형으로 캐스팅 string input = Console.ReadLine(); char asc_c = input[0]; int asc_i = (int)asc_c; Console.WriteLine(asc_i); 02 Convert.ToInt32 메서드 string input = Con code-piggy.tistory.com using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.Read.. 2023. 4. 26. 백준 C# 11720 아스키코드 알아보러 가기 C# - 아스키코드(정수를 문자로, 문자를 정수로) 0. 아스키코드 표 출처 : https://www.asciitable.com/ 1. Char to Int 01 int형으로 캐스팅 string input = Console.ReadLine(); char asc_c = input[0]; int asc_i = (int)asc_c; Console.WriteLine(asc_i); 02 Convert.ToInt32 메서드 string input = Con code-piggy.tistory.com using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.Read.. 2023. 4. 26. 백준 C# 11654 아스키코드 알아보러 가기 C# - 아스키코드(정수를 문자로, 문자를 정수로) 0. 아스키코드 표 출처 : https://www.asciitable.com/ 1. Char to Int 01 int형으로 캐스팅 string input = Console.ReadLine(); char asc_c = input[0]; int asc_i = (int)asc_c; Console.WriteLine(asc_i); 02 Convert.ToInt32 메서드 string input = Con code-piggy.tistory.com using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.Read.. 2023. 4. 26. 백준 C# 9080 using System; namespace baek2 { class Program { static void Main(string[] args) { string input = Console.ReadLine(); int T = int.Parse(input); for(int i = 0; i < T; i ++) { string input2 = Console.ReadLine(); char first = input2[0]; char last = input2[input2.Length-1]; Console.WriteLine($"{first}{last}"); } } } } 2023. 4. 26. 이전 1 ··· 17 18 19 20 21 22 23 ··· 27 다음 반응형