1

Jntm CSP-J2二等 2021-11-29 18:51:08 9

#include <bits/stdc++.h>

using namespace std;

int main() { int n, i, j, x, b, k; char c; freopen("diamond.in", "r", stdin); freopen("diamond.out", "w", stdout); cin >> n >> c; for (i = 1; i <= n; i++) { for (k = n - i; k > 0; k--) cout << " "; for (j = 1; j <= n; j++) cout << c; cout << endl; } fclose(stdin); // 关闭输入文件 fclose(stdout); // File close 文件的缩写 关闭输出文 return 0; }

{{ vote && vote.total.up }}