呜呜呜
查看原帖
呜呜呜
1206141
skyserver楼主2025/7/24 12:35

错哪里了!!

#include <iostream>
using namespace std;

int main(){
    int n;
    cin >> n;
    char a='A';
    for(int i=1; i<=n; i++){
        for(int j=1; j<=i; j++){
            cout << a;
            a++;
            if(a>='Z'){
                a='A';
            }
        }
        cout << endl;
    }
    return 0;
}
2025/7/24 12:35
加载中...