我们如何使用C#打印它 [英] How can we print this using C#

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

问题描述

我们如何使用C#打印此内容



1 2 3 4
5 6 7
8 9
10


我们如何使用c#
找到日期引用
向我发送以日期为导向的示例

[edit]删除了喊话-OriginalGriff [/edit]

How can we print this using C#



1 2 3 4
5 6 7
8 9
10


How can we find date deference using c#

send me date oriented examples

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

好吧,这要看情况了.如果您要执行所有操作,请在控制台上将其打印出来:
Well, it depends. If all you want to do it print it on the console:
Cosnole.Write("1 2 3 4\n5 6 7\n8 9\n10");

可以很好地完成工作.
如果您想在其他地方使用它,那么我们需要了解更多详细信息.

日期也很简单.只需使用DateTime类:

Will do the job fine.
If you want it somewhere else, then we need to know more detail.

The date is pretty simple , too. Just use the DateTime class:

DateTime now = DateTime.Now;


顺便说一句:
大喊大叫=不好.可以使人们远离回答您的问题.不要这样做.
苛刻的白痴=不好.可能会给您带来虐待的世界,而不是明智的答案.对您彬彬有礼,我们将为您提供帮助.没礼貌,然后...


BTW:
Shouting = bad. Can put people off from answering your questions. Don''t do it.
Being a demanding idiot = Bad. Can get you a world of abuse, rather than a sensible answer. Be polite to you, and we will help. Be rude, and...


这是您的学校作业问题吗?你应该先尝试一下.

试试这个代码.

Is it your school assignment question?? You should try yourself first.

Try this code.

int k = 1;
            for (int i = 1; i <= 4; i++)
            {
                for (int j = 1; j <= 4 - i+1; j++)
                {
                    Console.Write(k++);
                }
                Console.WriteLine();
            }


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

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