[프로그래머스]카운트 업

박예림·2023년 5월 25일
0

코테

목록 보기
100/132

class Solution {
    public int[] solution(int start, int end) {
        int[] answer = new int[(end-start)+1];
        int count = 0;

        for (int i = start; i <= end; i++) {
            answer[count] = i;
            count++;
        }
        return answer;
    }
}
profile
응애 나 아기개발자

0개의 댓글