不知道错哪里求解

P1000 超级玛丽游戏

kkkSb_O3 @ 2023-10-01 17:11:29

#include<stdio.h>
int main() {
    printf(
    "                ********\n"
    "               ************\n"
    "               ####....#.\n"
    "             #..###.....##....\n"
    "             ###.......######              ###            ###\n"
    "                ...........               #...#          #...#\n"
    "               ##*#######                 #.#.#          #.#.#\n"
    "            ####*******######             #.#.#          #.#.#\n"
    "           ...#***.****.*###....          #...#          #...#\n"
    "           ....**********##.....           ###            ###\n"
    "           ....****    *****....\n"
    "             ####        ####\n"
    "           ######        ######\n"
    "##############################################################\n"
    "#...#......#.##...#......#.##...#......#.##------------------#\n"
    "###########################################------------------#\n"
    "#..#....#....##..#....#....##..#....#....#####################\n"
    "##########################################    #----------#\n"
    "#.....#......##.....#......##.....#......#    #----------#\n"
    "##########################################    #----------#\n"
    "#.#..#....#..#.#..#....#..##.#..#....#..#    #----------#\n"
    "##########################################    ############\n"
    );
    return 0;
}

by midsummer_zyl @ 2023-10-01 17:15:49

24行

#include<stdio.h>
int main() {
    printf(
    "                ********\n"
    "               ************\n"
    "               ####....#.\n"
    "             #..###.....##....\n"
    "             ###.......######              ###            ###\n"
    "                ...........               #...#          #...#\n"
    "               ##*#######                 #.#.#          #.#.#\n"
    "            ####*******######             #.#.#          #.#.#\n"
    "           ...#***.****.*###....          #...#          #...#\n"
    "           ....**********##.....           ###            ###\n"
    "           ....****    *****....\n"
    "             ####        ####\n"
    "           ######        ######\n"
    "##############################################################\n"
    "#...#......#.##...#......#.##...#......#.##------------------#\n"
    "###########################################------------------#\n"
    "#..#....#....##..#....#....##..#....#....#####################\n"
    "##########################################    #----------#\n"
    "#.....#......##.....#......##.....#......#    #----------#\n"
    "##########################################    #----------#\n"
    "#.#..#....#..#.#..#....#..##.#..#....#..#     #----------#\n"
    "##########################################    ############\n"
    );
    return 0;
}

by xiechengxuan1061862 @ 2023-10-02 14:27:21

你用的是C语言吗? 你不能用PHP语言吗? PHP语言可以直接把要输出的东西复制上去就行了,没有必要再用C语言了啊 因为PHP语言只会把你所输入的全部字符和数字都原封不动的输出


by LFYdemi @ 2023-10-05 08:53:33

哎呀ETO是吧同志你好!!!


by DBL_MAX @ 2023-10-05 13:56:51

你可以这样:

#include<cstdio>
using namespace std;
int main() {
    printf(
    "                ********\n"
    "               ************\n"
    "               ####....#.\n"
    "             #..###.....##....\n"
    "             ###.......######              ###            ###\n"
    "                ...........               #...#          #...#\n"
    "               ##*#######                 #.#.#          #.#.#\n"
    "            ####*******######             #.#.#          #.#.#\n"
    "           ...#***.****.*###....          #...#          #...#\n"
    "           ....**********##.....           ###            ###\n"
    "           ....****    *****....\n"
    "             ####        ####\n"
    "           ######        ######\n"
    "##############################################################\n"
    "#...#......#.##...#......#.##...#......#.##------------------#\n"
    "###########################################------------------#\n"
    "#..#....#....##..#....#....##..#....#....#####################\n"
    "##########################################    #----------#\n"
    "#.....#......##.....#......##.....#......#    #----------#\n"
    "##########################################    #----------#\n"
    "#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#\n"
    "##########################################    ############\n"
    );
    return 0;
}

可以 AC


by 09090909a @ 2023-10-06 08:25:42

 #include <iostream>
using namespace std;
int main(){
cout<<"                ********                                       "<<endl;
cout<<"               ************                                    "<<endl;
cout<<"               ####....#.                                      "<<endl;
cout<<"             #..###.....##....                                 "<<endl;
cout<<"             ###.......######              ###            ###  "<<endl;
cout<<"                ...........               #...#          #...# "<<endl;
cout<<"               ##*#######                 #.#.#          #.#.# "<<endl;
cout<<"            ####*******######             #.#.#          #.#.# "<<endl;
cout<<"           ...#***.****.*###....          #...#          #...# "<<endl;
cout<<"          ....**********##.....            ###            ###  "<<endl;
cout<<"           ....****    *****....                               "<<endl;
cout<<"             ####        ####                                  "<<endl;
cout<<"           ######        ######                                "<<endl;
cout<<"############################################################## "<<endl;
cout<<"#...#......#.##...#......#.##...#......#.##------------------# "<<endl;
cout<<"###########################################------------------# "<<endl;
cout<<"#..#....#....##..#....#....##..#....#....##################### "<<endl;
cout<<"##########################################    #----------#     "<<endl;
cout<<"#.....#......##.....#......##.....#......#    #----------#     "<<endl;
cout<<"##########################################    #----------#     "<<endl;
cout<<"#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#     "<<endl;
cout<<"##########################################    ############     "<<endl;
    return 0;
}

by furina_yyds @ 2023-10-06 21:30:32

第24行应改为"#.#..#....#..#.#..#....#..##.#..#....#..# #----------#\n"


|