← Back to Analisis Kode
Prev

Question 13 — Bintang

Analisis Kode · 20 points · Answer key: 360

Next

Question

#include <iostream>
using namespace std;
int main() {
    int m = 30, n = 10;
    int total = 0;
    for (int i = 0; i < m; i++) {
        if (i % 2 == 0) {
            total += i;
        } else {
            total += n;
        }
    }
    cout << total << endl;
    return 0;
}

Jawab: …………………………………………………… {tuliskan output program}

Answers (7 members)

MemberAnswer
Yazid360
Habibie360
Athar360
Kian410
Algazel367
Priscilla375
Athmar350