06 2015 档案

if 语句运用
摘要:运用if语句完成对年、月、日的判断。 Console.WriteLine("其输入年份:"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("请输入月份:"); ... 阅读全文

posted @ 2015-06-04 20:02 逆风的刃 阅读(201) 评论(0) 推荐(0)

if,else语句的运用
摘要:1.求解一元二次方程Console.WriteLine("求解一元二次方程:a*x*x+b*x+c=0"); Console.Write("请输入 a="); double a = double.Parse(Console.ReadLine()); Co... 阅读全文

posted @ 2015-06-02 09:02 逆风的刃 阅读(423) 评论(0) 推荐(0)

关于条件运算符的应用
摘要:题目:输入一个24小时制的整数时间,判断所在时间段。 int a,b; a = int.Parse(Console .ReadLine());//输入的时间 b = 12; string s; s = a-b > 0 ?a-b+"pm" :a+"am" ; Console.... 阅读全文

posted @ 2015-06-01 08:54 逆风的刃 阅读(160) 评论(0) 推荐(0)