2005-04-02 15:13

2005-04-02 16:35
2005-04-03 22:27
2005-04-04 14:49
2005-04-04 15:03
using System;
namespace ConsoleApplication7 { class Class1 { static void Main(string[] args) { string n=Console.ReadLine(); try { int i=int.Parse(n); if(i>=0&&i<=9) Console.WriteLine("i 是数字"); } catch(Exception ex) { Console.WriteLine("i是字符"); } }
}

2005-04-04 21:52
2005-04-05 13:42
2005-04-05 13:44
伙计,你的代码有缺陷啊,你如果输入一个45它就显示不出它是什么类型了啊,经过思考我的代码你看一下吧 amespace ConsoleApplication7 { class Class1 { static void Main(string[] args) { string n=Console.ReadLine(); try { int i=int.Parse(n); if(i+1==i+1) Console.WriteLine("i 是数字"); } catch(Exception ex) { Console.WriteLine("i是字符"); } System.Threading .Thread .Sleep (10000); }
} }



2005-04-07 12:07
2005-04-07 12:14