Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
429 B
7
Indexable
Never
int a = 0, b=0, c=0, d=0;
int ans = 0;

void kebersamaan(int x) {
    ans += a;
    a = b;
    b = c;
    c = d;
    d = x;
}

int main() {
    a += 4;
    b += 3;
    c += 7;
    d += 2;
    kebersamaan(5);
    kebersamaan(2);
    a += 2;
    c += 3;
    kebersamaan(3);
    d += 4;
    c += 4;
    kebersamaan(0);
    a += 5;
    b += 6;
    kebersamaan(1);
    c += 9;
    a += 7;
    c += 2;
}
Leave a Comment