목록 썸네일형 리스트형 [C#] 약수 구하기 namespace ConsoleApplication7 { class Program { static void Main(string[] args) { string list = string.Join(", ", getDivisors(10)); Console.WriteLine("약수 : [{0}]", list); } /// /// 약수의 리스트를 반환하는 함수. /// /// 약수를 구할 수 private static List getDivisors(int num) { List divisors = new List(); for (int i = 1; i 더보기 이전 1 다음