如何打印图案?
问题描述:
*
***
*****
*******
*********
***********
**********
*******
****
**
*
如何使用C#打印以上内容?
*
***
*****
*******
*********
***********
**********
*******
****
**
*
How do I print the above using C#? Can you please show me the source code also?
答
控制台应用程序
+
System.Console.Out.WriteLine
+
一些for循环
+
一些变量
+
System.Threading.Thread.Sleep
=
星号程序.
另外,请读一本书并学习一些C#,这样您就不必问这个基本的问题了.
Console application
+
System.Console.Out.WriteLine
+
some for loops
+
some variables
+
System.Threading.Thread.Sleep
=
asterisks program.
Also, get a book and learn some C# so you don''t have to ask questions as basic as this one.
这是编程类中使用的一个问题,尝试自己动手做作业.
This is a question used in programming classes, try to do your own homework.
要使它真正有趣,您应该使用递归算法.这样一来,您应该会获得好成绩!
To make this really interesting - you should do it using a recursive algorithm. That way you should get a good mark!