哪错了?

P1000 超级玛丽游戏

moon1221 @ 2024-09-12 23:08:06

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

return 0;
}

by wangjunzhou @ 2024-09-12 23:34:51

@moon1221 第三行后面少了一个‘.’


by Jean_Gunnhildr @ 2024-09-12 23:35:18

@moon1221

#include<iostream>
using namespace std;
int main()
{
    cout << "                ********" << endl
         << "               ************" << endl
         << "               ####....#"<< endl//这里末尾少了一个'.'
         << "             #..###.....##...." << endl
         << "             ###.......######              ###            ###" << endl
         << "                ...........               #...#          #...#" << endl
         << "               ##*#######                 #.#.#          #.#.#" << endl
         << "            ####*******######             #.#.#          #.#.#" << endl
         << "           ...#***.****.*###....          #...#          #...#" << endl
         << "           ....**********##.....           ###            ###" << endl
         << "           ....****    *****...." << endl 
         << "             ####        ####" << endl
         << "           ######        ######" << endl
         << "##############################################################" << endl
         << "#...#......#.##...#......#.##...#......#.##------------------#" << endl
         << "###########################################------------------#" << endl
         << "#..#....#....##..#....#....##..#....#....#####################" << endl
         << "##########################################    #----------#" << endl
         << "#.....#......##.....#......##.....#......#    #----------#" << endl
         << "##########################################    #----------#" << endl
         << "#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#" << endl
         << "##########################################    ############" ;

return 0;
}

看一下题干的输出第三行,你少了个点

求关


by pmkmzfuzsotqotmzs @ 2024-09-13 08:46:26

@moon1221

#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 moon1221 @ 2024-09-14 20:37:26

@pmkmzfuzsotqotmzs @Alicezhou @wangjunzhou 好的好的,谢谢


by TimADE @ 2024-09-15 15:06:13

@moon1221

你没写cout,AC代码求关

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

|