哪错了?

P1000 超级玛丽游戏

codefashion @ 2024-09-03 13:10:28

#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"
);
   return 0;
}

by mc_xiexie @ 2024-09-03 13:18:48

@codefashion

你尝试运行过吗?是"\n"换行,而不是"/n"换行


by haimingbei @ 2024-09-03 13:31:13

@codefashion 所有/n改为\n


by hanxiaofensheng @ 2024-09-03 14:11:25

#include<bits/stdc++.h>
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 codefashion @ 2024-09-03 23:22:58

@mc_xiexie 可是我把/改为\后还是显示WA啊


by 18732010135dd @ 2024-09-03 23:45:26

你的图形不对,你看马里奥的脚是对其第十一的代表地面的星的,地面往上统一加俩空格


by 18732010135dd @ 2024-09-03 23:47:54

#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 18732010135dd @ 2024-09-03 23:48:17

求关


by codefashion @ 2024-09-04 13:04:03

@18732010135dd so嘎,谢了


by CPSXE7 @ 2024-09-12 09:13:30

\n不是/n 要换行


by MYL_OJ @ 2024-09-16 11:08:18

print(' ****') print(' ****') print(' ####....#.') print(' #..###.....##....') print(' ###.......###### ### ###') print(' ........... #...# #...#') print(' ##*####### #.#.# #.#.#') print(' ####****###### #.#.# #.#.#') print(' ...#..*###.... #...# #...#') print(' ....**##..... ### ###') print(' ....*** ....') print(' #### ####') print(' ###### ######') print('##############################################################') print('#...#......#.##...#......#.##...#......#.##------------------#') print('###########################################------------------#') print('#..#....#....##..#....#....##..#....#....#####################') print('########################################## #----------#') print('#.....#......##.....#......##.....#......# #----------#') print('########################################## #----------#') print('#.#..#....#..##.#..#....#..##.#..#....#..# #----------#') print('########################################## ############')


| 下一页