[정올] Language Coder_반복제어문2_자가진단6_code546 (C)
두비니
·2020. 3. 23. 04:34
#include <stdio.h>
int main() {
int n, num, sum=0;
double avg;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &num);
sum += num;
}
avg = (double)sum / n;
printf("avg : %.1f\n", avg);
if (avg >= 80)
printf("pass");
else
printf("fail");
return 0;
}
'Coding_Algorithm > 정올 문제풀이' 카테고리의 다른 글
[정올] Language Coder_반복제어문2_자가진단8_code548 (C) (0) | 2020.03.24 |
---|---|
[정올] Language Coder_반복제어문2_자가진단7_code547 (C) (0) | 2020.03.24 |
[정올] Language Coder_반복제어문2_자가진단5_code545 (C) (0) | 2020.03.22 |
[정올] Language Coder_반복제어문2_자가진단4_code544 (C/Python) (0) | 2020.03.21 |
[정올] Language Coder_반복제어문2_자가진단3_code543 (C/Python) (0) | 2020.03.20 |