跳到正文

题解

B2025

liuyiyang_约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年8月5日
收录
2025年12月12日
更新
2026年10月13日
篇幅
约 1 分钟
题目
B2025

版本

  1. v1当前

没啥好说的,就是个输出,不过要用换行符------

C++
endl//也可以用"\n",但要带双引号。

剩下的就是五行输出,启动代码:

C++
#include<bits/stdc++.h>
using namespace std;
void lesson1(){
    cout<<"  *"<<endl;
    cout<<" ***"<<endl;
    cout<<"*****"<<endl;
    cout<<" ***"<<endl;
    cout<<"  *"<<endl;
}
int main(){
    lesson1();
    return 0;
}
原文