第九周项目3——(f)

来源:互联网 发布:淘宝优惠券转手机端 编辑:程序博客网 时间:2024/04/30 09:26
 <pre class="cpp" name="code"> /*  *Copyright (c) 2014,烟台大学计算机学院  *All rights reserved.  *文件名称:Annpion.cpp  *作者:苏强 *完成日期:2014年10月25日  *版本号:v1.0 *  *问题描述:输出星号图  *输入描述:不输入  *程序输出:输出星号图  */ #include <iostream>using namespace std;int main(){    int i,j,t,s;    for(i=1; i<=6; i++)    {        for(t=1; t<=6-i; t++)        {            cout<<" ";        }        for(j=1; j<=2*i-1; j++)        {            cout<<"*";        }        cout<<endl;    }    for(s=1; s<=5; s++)    {        for(t=1; t<1+s; t++)        {            cout<<" ";        }        for(j=1; j<=11-2*s; j++)        {            cout<<"*";        }        cout<<endl;    }    cout<<endl;}

                                             
0 0
原创粉丝点击