标题:求解……才玩几天,最简单的东西都写不好
取消只看楼主
h0770942
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2020-7-31
 问题点数:0 回复次数:1 
求解……才玩几天,最简单的东西都写不好
static void Main(string[] args)
        {
            int a = 0;
            int b = 0;
            int c = 0;
            Console.WriteLine();
            for (; a<=8;a++);
            {
                for (; c<a;c=c+1 )
                {
                    for (; b<c; b++)
                    {
                        Console.Write("* ");                    
                    }
                    Console.WriteLine();
                    b = 0;
                }
                c = 0;
            }
            Console.Write("A="+a);
            Console.Write("    B=" + b);
            Console.WriteLine("    C=" + c);
            for (a--; a<0; a--) ;
            {
                for (c=a; c>0; c--)
                {
                    for (b=c; b>0; b--)
                    {
                        Console.Write("* ");
                    }
                    Console.WriteLine();
                }
            }
            Console.WriteLine();
            Console.WriteLine("终于成功打出一串星星 ^_^  ");
            Console.WriteLine("妈B的错了好多次");
            Console.ReadLine();

求解:第二个for大循环中,要a<0(假)才执行循环体?a>0直接跳出?

[此贴子已经被作者于2020-7-31 11:24编辑过]

搜索更多相关主题的帖子: int Write WriteLine for for WriteLine Console int Write Console 
2020-07-31 11:00
h0770942
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2020-7-31
得分:0 
2020-07-31 11:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-502705-1-1.html




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

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