[프로그래머스 | Lv.0] 배열의 평균 값

이승민·2023년 7월 20일
0

프로그래머스

목록 보기
2/27
post-thumbnail

https://school.programmers.co.kr/learn/courses/30/lessons/120817

📝 나의 풀이

using System;

public class Solution {
    public double solution(int[] numbers) {
        double answer = 0;
        
        for(int i=0; i<numbers.Length; i++){
            answer += numbers[i];
        }
        return answer/numbers.Length;
    }
}

1개의 댓글

comment-user-thumbnail
2023년 7월 20일

잘 봤습니다. 좋은 글 감사합니다.

답글 달기

관련 채용 정보