制作字母金字塔 使用for循环 使用for循环 #include<iostream>; using namespace std; int main() { for(int i = 0; i < 4; i++) { for(int j = 0; j <= 2 - i; j++) { cout << " " ; } for(int j = 0; j <= 2*i; j++) { cout << (char)('A' + i); } cout << endl; } return 0; }