第29791题 单选题
以下C++代码运行后,控制台的最终输出结果是?
#include <iostream>
using namespace std;
int main() {
    int arr[3][3] = {0};
    for(int i=0; i<3; i++){
        for(int j=0; j<3; j++){
            if(i >= j) {
                arr[i][j] = i + j;
            }
        }
    }
    for(int i=0; i<3; i++){
        for(int j=0; j<3; j++){
            cout << arr[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}
A

0 0 0 1 2 0 2 3 4

B

0 1 2 0 2 3 0 0 4

C

0 1 2 1 2 3 2 3 4

D

0 0 0 0 1 2 0 2 4

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析