반응형 분류 전체보기505 백준 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# - 아스키코드(정수를 문자로, 문자를 정수로) 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 = Console.ReadLine(); char asc_c = input[0]; int asc_i = Convert.ToInt32(asc_c); Console.WriteLine(asc_i); 2. Int to Char 01 char형으로 캐스팅 string input = Console.ReadLine(); int input.. 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. 백준 C# 2743 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; using System.Collections.Generic; using System.Linq; using System.Text; namespace baek2 { class Program { static void Main(s.. 2023. 4. 21. 이전 1 ··· 68 69 70 71 72 73 74 ··· 85 다음 반응형