作者colset ()
看板C_Sharp
标题Re: [问题] 谁能挑战这程式?
时间Mon Nov 2 22:40:50 2009
※ 引述《heliosy (这一栏是要做啥用的NI》之铭言:
: ※ 引述《tomex (tomex)》之铭言:
: : 很简单的需求,就是在console里让user打密码,再秀出来:
: : Input a password: ***
: : Your password is: abc
: : 不过细想下,却又觉得很难写喔...
: : 挑战一下吧!
: : 问倒很多人了...
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string password;
Console.Write("input your password:");
password=Console.ReadLine();
Console.Write("your password is:{0}", password);
Console.Read();
}
}
}
这样对吗?
简单扼要
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.33.148.219
1F:→ FantasyRyu:啊星号哩 11/03 00:05
2F:→ tmxcrows:这好久以前的文章了... 11/03 00:30
3F:→ evernever: 啊星号哩 11/03 08:12
4F:→ megaman1206: 星号哩 11/03 12:47
5F:→ kyoin:... 11/03 16:57
6F:推 petrushka:要使用 Console.ReadKey(true) 去处理 11/03 20:46
7F:嘘 yes302:这是初学者题目吧? 11/05 02:09