[프로그래머스 | Lv.0] 문자열의 앞의 n글자

728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181907

📝 나의 풀이

using System;

public class Solution {
    public string solution(string my_string, int n) {
        string answer = "";
        
        for(int i=0; i<n; i++){
            answer += my_string[i];
        }
        return answer;
    }
}
 
728x90