1-1 欢迎来的C++世界
Time Limit: 1000MS
Memory Limit: 65536KB
Problem Description
C++的输出方法
VC++开发环境,创建一个控制台应用程序,利用C++无
Output
13行,34个*,组成边框的形状,第三行Welcome to ;从第五到第十一行输出的形状C++!”的图形。
Example Input
Example Output
********************************** * * * Welcome to * * * * *** * * * * * * * * * * * * * * * *** *** * * * * * * * * * * * * * *** * * * * **********************************
Hint
Author
黄晶晶
#include<iostream>
using namespace std;
int main()
{
int i;
//1
for (i=0;i<34;i++)
cout<<"*";
cout<<endl;
//2
cout<<"*";
for(i=1;i<33;i++)
cout<<" ";
cout<<"*"<<endl;
//3
cout<<"*";
for(i=1;i<=10;i++)
cout<<" ";
cout<<"Welcome to";
for(i=0;i<11;i++)
cout<<" ";
cout<<"*"<<endl;
//4
cout<<"*";
for(i=1;i<33;i++)
cout<<" ";
cout<<"*"<<endl;
//5
cout<<"* *** * *"<<endl;
//6
cout<<"* * * * *"<<endl;
//7
cout<<"* * * * * *"<<endl;
//8
cout<<"* * *** *** * *"<<endl;
//9
cout<<"* * * * * *"<<endl;
//10
cout<<"* * * *"<<endl;
//11
cout<<"* *** * *"<<endl;
//12
cout<<"* *"<<endl;
//13
for (i=0;i<34;i++)
cout<<"*";
cout<<endl;
return 0;
}