第9周项目3-输出星号图(f)
2014-10-23 16:07
134 查看
/* *Copyright (c) 2014,烟台大学计算机学院 *All rights reserved. *文件名称:Annpion.cpp *作者:王耀鹏 *完成日期:2014年10月23日 *版本号:v1.0 * *问题描述:输出星号图 *输入描述:不输入 *程序输出:输出星号图 */ #include<iostream> using namespace std; int main() { int i,t,s,x,y,z; for (i=1;i<=6;i++) { for (t=1;t<=(6-i);t++) { cout<<" "; } for (s=1;s<=(2*i-1);s++) { cout<<"*"; } cout<<endl; } for (x=1;x<=5;x++) { for (y=1;y<=x;y++) { cout<<" "; } for (z=1;z<=(11-2*x);z++) { cout<<"*"; } cout<<endl; } return 0; }
运行结果:
相关文章推荐
- 第9周项目3-输出星号图(2)
- 第9周项目3输出星号图(2)
- 第9周项目3-输出星号图a
- 第9周项目3-输出星号图(补图e、f)
- 第9周项目3-输出星号图
- 第9周项目3-输出星号图(b)
- 第9周项目3(3)-输出星号图
- 第9周项目3-输出星号图b
- 第9周项目3输出星号图(3)
- 第9周项目3-输出星号图
- 第9周项目3-输出星号图(d)
- 第9周项目3(1)-输出星号图
- 第9周项目3-输出星号图(a)
- 第9周项目3-输出星号图d
- 第9周项目3-输出星号图(a)
- 第9周项目3-输出星号图(e)
- 第9周项目3-输出星号图(b)
- 第9周项目3 输出星号图(1)
- 第9周项目3-输出星号图e
- 第9周项目3输出星号图(1)