| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1919 人关注过本帖
标题:初学者,求牛人写段输出"心"型图案代码研究!
只看楼主 加入收藏
haleyheywood
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-7-25
收藏
得分:0 
五楼的不错
2011-10-06 22:39
唯un忆
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-6-10
收藏
得分:0 
#include<iostream.h>
#include<iomanip.h>
int main()
{
    int x,y;
    cout<<setw(15)<<""<<setfill('*')<<setw(19)<<"         "<<setw(11)<<endl;
    cout<<"        "<<setw(24)<<"     "<<setw(20)<<endl;
    cout<<"   "<<setw(54)<<endl;
    cout<<" "<<setw(58)<<endl;
    cout<<setw(60)<<endl;
    for(x=1;x<=30;x++)
    {
        cout<<setfill(' ')<<setw(x++);
        for(y=65;y>x*2+2;y--)cout<<"*";
        cout<<endl;
    }
    cout<<setw(30)<<"*"<<endl;
    cout<<"                  My heart belongs to you!"<<endl;
    cout<<endl;
    cout<<endl;
    return 0;
}
2012-06-10 05:46
唯un忆
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-6-10
收藏
得分:0 
回复 12楼 唯un忆
这个最好  看看就知道
2012-06-10 05:47
快速回复:初学者,求牛人写段输出"心"型图案代码研究!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011319 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved