78.json 1.4 KB
Newer Older
每日一练社区's avatar
test  
每日一练社区 已提交
1
{
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
  "question_id": 1057453,
  "question_title": "输入一个正整数n(代表图形的行数),输出如样例形式的图形",
  "question_content": "输入:5\n输出:\n        A\n       ABA  \n      ABCBA  \n     ABCDCBA  \n    ABCDEDCBA",
  "difficulty": "中等",
  "answer_id": 1254581,
  "answer_content": "\n```\n#include <stdio.h>\n#include <iostream>\n\nusing namespace std;\n\nint main() {\n\tint N;\n\tcin >> N;\n\tfor (int i = 0; i < N; i++)\n\t{\n\t\tfor (int j = 0; j < N - i; j++) printf(\" \");\n\t\tfor (int j = 0; j < i; j++) printf(\"%c\", (char)(j + 'A'));\n\t\tfor (int j = i; j >= 0; j--) printf(\"%c\", (char)(j + 'A'));\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}\n\n```\n# 问题解决的话,请点下采纳",
  "tag_name": "c++",
  "cpp": "#include <stdio.h>\n#include <iostream>\nusing namespace std;\nint main() {\n\tint N;\n\tcin >> N;\n\tfor (int i = 0; i < N; i++)\n\t{\n\t\tfor (int j = 0; j < N - i; j++) printf(\" \");\n\t\tfor (int j = 0; j < i; j++) printf(\"%c\", (char)(j + 'A'));\n\t\tfor (int j = i; j >= 0; j--) printf(\"%c\", (char)(j + 'A'));\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}",
  "topic_link": "https://bbs.csdn.net/topics/600470266",
  "status": 1,
  "keywords": "数学运算,图形输出",
  "license": "csdn.net",
  "notebook": {
    "cpp": "https://codechina.csdn.net/csdn/csdn-daily-code/-/jupyter/master/data/notebook/answer/ipynb/cpp/78.ipynb?type=file"
  },
  "notebook_enable": 1,
  "author": "qq_32564775"
每日一练社区's avatar
test  
每日一练社区 已提交
19
}