| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1168 人关注过本帖
标题:困饶我的一道For循环题目。
只看楼主 加入收藏
Rank: 1
等 级:新手上路
帖 子:255
专家分:0
注 册:2005-4-25
收藏
得分:0 
以下是引用weizheng在2005-4-29 20:30:01的发言: 纠正4楼的语法错误 for(j=7;j--)
并且4楼的程序有很多错误哦,应该好好检查.
你把我写的复制到编绎程序里试试再说嘛 真是武断

/bbs/showimg.asp?BoardID=5&filename=2005-4/2005427111228529.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./bbs/showimg.asp?BoardID=5&filename=2005-4/2005427111228529.jpg');}" onmousewheel="return imgzoom(this);" alt="" /> 欢迎加入C语言QQ群698156 我们都是菜鸟乃至新手 坚信有一天定能展翅高飞 因为有着努力的决心 衷心盼望你的到来 让我们一起进步
2005-04-29 22:40
maxkaoyan2005
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-4-28
收藏
得分:0 
不好意思 没运行 直接回帖写的 改了现

[此贴子已经被作者于2005-5-1 14:56:06编辑过]



2005-05-01 14:53
chianti
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-5-1
收藏
得分:0 
class xin
{   
   public static void main(String args[])
      {
         int i ,j;
         for(i=1;i<=4;i++)
         {for(j=1;j<=7;j++)
              {if( j<=4-i||j>=4+i)
               System.out.print(" ");
               else System.out.print("*");
              }
          System.out.println("\n");
         }
     }
 }
用java写的
2005-05-01 20:08
bofe
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-4-9
收藏
得分:0 
4楼的强啊,5楼的输出好象不是等边三角型啊
2005-05-04 21:21
冷酷无情
Rank: 1
等 级:新手上路
帖 子:25
专家分:0
注 册:2005-5-4
收藏
得分:0 
main()
{
 int i,j,k;
 for(i=0;i<=3;i++)
 {
  for(j=0;j<=2-i;j++)
   printf(" ");
  for(k=0;k<=2*i;k++)
   printf("*");
  printf("\n");
 }
}

2005-05-04 21:48
快速回复:困饶我的一道For循环题目。
数据加载中...
 
   



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

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