如何打印图案? [英] How to print a pattern?

查看:74
本文介绍了如何打印图案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

* ***
*****
*******
*********
***********
**********
*******
****
**
*

如何使用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!


这篇关于如何打印图案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆