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}