#include <stdio.h>

int main() {
    // 학생 5명의 점수 배열
    int scores[5] = {85, 90, 75, 100, 95};
    int sum = 0;

    // 배열의 0번부터 4번까지 순회
    for (int i = 0; i < 5; i++) {
        sum += scores[i]; // 각 점수를 sum에 더함
        printf("%d번 학생 점수: %d\n", i + 1, scores[i]);
    }

    printf("--- \n");
    printf("총점: %d\n", sum);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: