我是一个蒟蒻,这是我朋友教我的。(本人没看懂),求大佬讲解

P1000 超级玛丽游戏

lzbyyds @ 2023-12-16 16:37:25

#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;
}

by Doors_Cross @ 2023-12-18 16:25:03

@lzbyyds

#include <iostream>//头文件,用了它才能用cout
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;//最后结束语句块,养成好习惯
}
感觉白打了1607个字

by lzbyyds @ 2023-12-19 16:25:52

@Doors_Cross @Doors_Cross 懂了,谢谢大佬


by ztf2011 @ 2023-12-21 13:03:32

6666666


by Eric_dong @ 2023-12-24 22:55:52

endl换行啊……

6


by 11ofjay @ 2024-01-01 10:41:54

用PHP不就好了 @lzbyyds


by AC_kkk0926 @ 2024-01-22 12:03:26

@jay0207 雀石


by wangzhenjia @ 2024-05-14 22:03:58

@lzbyyds

cout<<"";

""里面加你要输出的内容

cout<<""<<endl;

endl可以换行


上一页 |