用C#编辑程序,要求输出如下图形
* * * * * * * * * *
* * * * * * * * *
* * * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
用C#编辑程序,要求输出如下图形(拜托编程高手了)
答案:2 悬赏:80
解决时间 2021-01-31 10:55
- 提问者网友:孤笛钟情你
- 2021-01-31 00:22
最佳答案
- 二级知识专家网友:青春如此荒謬
- 2021-01-31 00:49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication35
{
class Program
{
static void Main(string[] args)
{
for (int i = 10; i >= 1; i--)
{
for (int j = 1; j <= i; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication35
{
class Program
{
static void Main(string[] args)
{
for (int i = 10; i >= 1; i--)
{
for (int j = 1; j <= i; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
全部回答
- 1楼网友:深街酒徒
- 2021-01-31 01:39
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
for (int i = 10; i >= 1; i--)
{
Console.WriteLine(print(i));
}
Console.Read();
}
private static string print(int num)
{
string r = string.Empty;
for (int i = 0; i < num; i++)
{
r += "*";
}
r += "\n";
return r;
}
}
}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯