作者kingtw1978 (King)
看板C_Sharp
标题[请益] 简易Console输出入,换种写法
时间Thu Sep 1 07:48:54 2005
static void Main(string[] args)
{
Console.WriteLine("This is Assignment 2_1");
Console.WriteLine("Please enter your name");
string d;
d = Console.ReadLine();
Console.ReadLine();
Console.WriteLine(" You entered " + (d) + " at " + DateTime.Now);
}
这是我写的
前面两行是废话,再来是要你输入你的名字
利用 ReadLine() 把资料读出来,最後显示出来
You entered [你的名字] at 时间
例如:You entered [John Smith] at 8/29/2005 11:32:45 AM
最重要的是後面那一行
Console.WriteLine(" You entered " + (d) + " at " + DateTime.Now);
有办法稍微改变吗?或是别种写法
不然很容易和别人重复到.....谢谢
--
因看板太多不可能逐一观看
麻烦各位回覆文章的时候也请顺便回覆到我的信箱
http://blog.xuite.net/kingtw1978/blog
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 199.184.205.56