码迷,mamicode.com
首页 >  
搜索关键字:readline    ( 2056个结果
一位一位竖着FOR出输入的字符串
static void Main(string[] args) { string a=Console.ReadLine(); for (int i = 0; i < a.Length; i++) ...
分类:其他好文   时间:2015-04-03 09:12:50    阅读次数:91
try判断是不是闰年
static void Main(string[] args) { while (true) { string rn = Console.ReadLine(); string s ...
分类:其他好文   时间:2015-04-03 09:11:36    阅读次数:111
水开了
while (true) { Console.Write("烧水不?Y/N:"); string a = Console.ReadLine(); if (a =="Y" ) { Console.WriteLine("多少度了"); for (int i = 1; i <=100; i+...
分类:其他好文   时间:2015-04-03 09:09:11    阅读次数:108
判断年份
while (true) { Console.Write("请输入一个年份:"); string a = Console.ReadLine(); string b = ""; try { DateTime c = Convert.ToDateTime(a+"-2-29"); b="年是闰年"; } ...
分类:其他好文   时间:2015-04-03 09:08:32    阅读次数:133
简单判断邮箱格式
static void Main(string[] args) { while (true) { string email = Console.ReadLine(); if (email.Conta...
分类:其他好文   时间:2015-04-03 09:08:01    阅读次数:143
邮箱地址
while (true) { string email = Console.ReadLine(); if (email.Contains("@")||email.Contains(".com")||email....
分类:其他好文   时间:2015-04-03 09:05:14    阅读次数:107
求奇数偶数的和,,利用while循环
static void Main(string[] args) { while (true) { try { Console.Write("请输入一个数:"); int n = Convert.ToInt32(Console.ReadLine()); int i = 1; int s = 0, z....
分类:其他好文   时间:2015-04-02 20:51:02    阅读次数:152
判断邮箱的地址是否正确
static void Main(string[] args) { string a; Console.WriteLine("请输入您的邮箱地址:"); a = Console.ReadLine(); if (a.Contains("@")&&a.Contains(".com"))//这句话的意思是...
分类:其他好文   时间:2015-04-02 20:48:52    阅读次数:143
String 类;Math 类;
static void Main(string[] args) { while (true) { /* string x; Console.WriteLine("请随便输入:"); x= Console.ReadLine(); x=x.Trim();//前边的空格和后面的空格都去掉 Consol.....
分类:其他好文   时间:2015-04-02 20:47:09    阅读次数:115
符号替换
static void Main(string[] args) { string s = ""; s = "★\n★★\n★★★\n★★★★\n★★★★★"; Console.WriteLine(s); Console.ReadLine(); }
分类:其他好文   时间:2015-04-02 20:42:54    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!