{
  "question_id": 222425,
  "question_title": "字符图形输出",
  "question_content": "编程实现把输入任意整数n后，可打印出n行三角字符阵列图形。例如，输入整数5时，程序运行结果如下：\nENTER A NUMBER：5<回车>\nA  C  F  J  O\nB  E  I  N\nD  H  M\nG  L\nK",
  "difficulty": "中等",
  "answer_id": 178405,
  "answer_content": "\n\n```\n #include <iostream>\nusing namespace std;\n\nchar a[100][100];\n\nint main()\n{\n    char c = 'A';\n    int n = 5;\n    for (int i = 0; i < n; i++)\n    {\n        for (int j = i; j >= 0; j--)\n        {\n            a[j][i - j] = c++;\n        }\n    }\n    for (int i = 0; i < n; i++)\n    {\n        for (int j = 0; j < n - i; j++)\n        {\n            cout << a[i][j] << \" \";\n        }\n        cout << endl;\n    }\n}\n```\n\n",
  "tag_name": "c++",
  "cpp": " #include <iostream>\nusing namespace std;\nchar a[100][100];\nint main()\n{\n\tchar c = 'A';\n\tint n = 5;\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tfor (int j = i; j >= 0; j--)\n\t\t{\n\t\t\ta[j][i - j] = c++;\n\t\t}\n\t}\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tfor (int j = 0; j < n - i; j++)\n\t\t{\n\t\t\tcout << a[i][j] << \" \";\n\t\t}\n\t\tcout << endl;\n\t}\n}",
  "topic_link": "https://bbs.csdn.net/topics/600469861",
  "status": 1,
  "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作",
  "license": "csdn.net",
  "notebook": {
    "cpp": "https://codechina.csdn.net/csdn/csdn-daily-code/-/jupyter/master/data/notebook/answer/ipynb/cpp/117.ipynb?type=file"
  },
  "notebook_enable": 1,
  "author": "ccqz"
}