一个简单的题解
2026-08-30 19:57:20
发布于:广东
4阅读
0回复
0点赞
这道题很简单,其实算不上普及,只需要开始一个<iostream>后面就简单了。
答案
#include<iostream>
using namespace std;
int main(){
cout<<"***********"<<endl;
cout<<"* ******* *"<<endl;
cout<<"* * * *"<<endl;
cout<<"* ******* *"<<endl;
cout<<"***********"<<endl;
}
其实还有一种
#include<iostream>
using namespace std;
int main(){
cout<<"***********"<<endl;
cout<<"* ******* *"<<endl;
for(int i=1;i<=2;i++){
cout<<"* * * *"<<endl;
}
cout<<"* ******* *"<<endl;
cout<<"***********"<<endl;
}
这里空空如也








有帮助,赞一个