简单的C++程序及其运行结果
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
{
for(int j=1; j<=i; ++j)
cout<<"M";
cout<<endl;
}
}
4.0#include <iostream>
using namespace std;
int main(){
for(int i=1; i<=10; ++i){
for(int j=1; j<=i-1; ++j)
return 0;
}
2.0#include <iostream>
using namespace std;
int main(){
cout<<"helloworld\n";
return 0;}
3.0#include <iostream>
using Fra Baidu bibliotekamespace std;
int main()
{for(int i=1; i<=10; ++i)
#include <iostream>
using namespace std;
int main()
{
cout<<" *\n";
cout<<" ***\n";
cout<<" *****\n";
cout<<"*******\n";
cout<<" *****\n";
cout<<" ***\n";
cout<<" *\n";
cout<<" ";
for(int k=1; k<=21-2*i; ++k)
cout<<" M";
cout<<end1;
}
for(int j=1; j<=i; ++j)
cout<<"M";
cout<<endl;
}
}
4.0#include <iostream>
using namespace std;
int main(){
for(int i=1; i<=10; ++i){
for(int j=1; j<=i-1; ++j)
return 0;
}
2.0#include <iostream>
using namespace std;
int main(){
cout<<"helloworld\n";
return 0;}
3.0#include <iostream>
using Fra Baidu bibliotekamespace std;
int main()
{for(int i=1; i<=10; ++i)
#include <iostream>
using namespace std;
int main()
{
cout<<" *\n";
cout<<" ***\n";
cout<<" *****\n";
cout<<"*******\n";
cout<<" *****\n";
cout<<" ***\n";
cout<<" *\n";
cout<<" ";
for(int k=1; k<=21-2*i; ++k)
cout<<" M";
cout<<end1;
}