2022.11.02.TIL
decimal형과 float형은 접미사가 필요함 decimal d = 1.234m; float f = 1.23455f; C#도 문자열과 더하면 자동변환 WriteLine안에 {}를 통해 출력 폼을 정해줄 수 있다. (각 {}안에는 ,뒤의 객체들이 들어감) String.Format을 이용하여 해당 문자열을 문자열에 저장할 수 있다. using System; namespace asd { class Program { static void Main(string[] args) { Console.WriteLine("10 이하의 소수: {0}, {1}, {2}, {3}",2,3,5,7); string primes; primes = String.Format("10 이하의 소수: {0}, {1}, {2}, {3}",2,..