洛谷P1000题解

 今天我又双叒叕打开题库,回顾老题(好吧根本没做过)。第一眼一看:好家伙,P1000超级玛丽。这名字……不会是想要我们编游戏吧!

点进去看了看,才反应过来,一点也不难好吧……

题目让我们输出一个超级玛丽里的场景,直接无脑输出就行了。

代码:

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

就很多。

建议各位别用手打,Ctrl+c总会吧……

代码解析:

#include<iostream>
/*c++头文件,i=input,o=output。意思为输入输出流。是c++的一个常用库。*/
//   //是注释。可以为代码做解释。/*    */是多行注释。
using namespace std;
//申请使用标准库函数(写了这个代码后面用cin、cout这些就不用打std::了)
int main(){//主函数,程序要在这里运行

}
int main(){

    return 0;//退出程序
}
cout<<""<<endl;
//cout<<是输出,后面接内容。""是字符串,里面写内容。endl是换行符。cout一个<<只能接一个内容,要写下一个内容就要再打一个<<。

函数框架:

//函数框架
#include<iostream>
using namespace std;
int main(){//内容要缩进。
  //内容;
  return 0;
}

最后求一波赞,各位萌新可以加入我的团队“萌新……”。

  • 6
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值