| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 10524 人关注过本帖
标题:[求助]打印数字金字塔。。。。
取消只看楼主 加入收藏
itmen
Rank: 1
等 级:新手上路
帖 子:15
专家分:6
注 册:2010-4-1
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:3 
[求助]打印数字金字塔。。。。
编程实现打印下列图形。要求图形的行数从键盘输入,可以打印任意行的图形。如行数为5时,图形如下:
     1
    121
   12312
  1234123
 123451234

函数7时:
      1
     121
    12312
   1234123
  123451234
 12345612345
1234567123456
搜索更多相关主题的帖子: 金字塔 数字 打印 
2010-04-24 05:11
itmen
Rank: 1
等 级:新手上路
帖 子:15
专家分:6
注 册:2010-4-1
收藏
得分:0 
回复 2楼 明王朝
厉害!!谢谢啦。。
2010-04-24 11:48
itmen
Rank: 1
等 级:新手上路
帖 子:15
专家分:6
注 册:2010-4-1
收藏
得分:0 
回复 6楼 李坤无敌
恩、、虽然大家都是新手!!不过你强我好多啦。!!
2010-04-25 00:05
itmen
Rank: 1
等 级:新手上路
帖 子:15
专家分:6
注 册:2010-4-1
收藏
得分:0 
回复 4楼 满晓
pprintf()所有参数
type Output Example
c Character
d or i Signed decimal integer  
e Scientific notation (mantise/exponent) using e character
E Scientific notation (mantise/exponent) using E character
f Decimal floating point
g Use shorter %e or %f
G Use shorter %E or %f
o Signed octal
s String of characters sample
u Unsigned decimal integer  
x Unsigned hexadecimal integer
X Unsigned hexadecimal integer (capital letters)  
p Address pointed by the argument  
n Nothing printed. The argument must be a pointer to integer where the number of characters written so far will be stored.  
2010-04-25 00:38
快速回复:[求助]打印数字金字塔。。。。
数据加载中...
 
   



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

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