#include <stdio.h>

int main() {
    // 시간복잡도 
    // 최악의 시간 
    // O(1) O(n) O(n^2) O(logn)
    // O(1) -> printf, scanf,int i = 0;
    // O(n) -> for 문 while 문 
    // O(n^2) -> for문 중첩
    // O(n^3)

    int S[] = {10, 7, 11, 5, 13, 8};
    int n = 6;
    int i = 0;
    int sum = 0;

    for (i = 0; i < n; i++) {
        sum += S[i];
    }

    
    printf("%d", 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: