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

이승민·2023년 8월 8일
0

프로그래머스

목록 보기
27/27

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;
    }
}

0개의 댓글

관련 채용 정보