함수 average()

Jmnote (토론 | 기여)님의 2014년 5월 28일 (수) 11:43 판 (새 문서: ;average ;avg category:Math ==Excel== category:excel <source lang='php'> =AVERAGE(1,2,3,4,5) // 3 </source> ==PHP== category:PHP <source lang='php'> $arr = array(1, 2, 3...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
average
avg

1 Excel

=AVERAGE(1,2,3,4,5)
// 3

2 PHP

$arr = array(1, 2, 3, 4, 5);
$avg = array_sum($arr) / count($arr);
echo $avg;

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}