摘要: 案例7:class Program { static void Main(string[] args) { Account account1 = new Account(50.00m); Account account2 = new Account(-7.00m); Console.WriteLine("{0:C}",account1.Balance);//50 Console.WriteLine("{0:C}", account2.Balance); } ... 阅读全文
posted @ 2011-12-13 16:57 Anleb 阅读(376) 评论(0) 推荐(1) 编辑
摘要: class Program { static void Main(string[] args) { //投掷子的游戏 Console.WriteLine("Today,we play one game:"); Console.WriteLine("_________________________________________By Mr.w"); for (int i = 0; i < 10; i++) { ... 阅读全文
posted @ 2011-12-13 16:53 Anleb 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 递归方法 说白了就是 自己调用自己的方法:具体看案例吧,说不清楚 class Program { static void Main(string[] args) { //递归方法 for (int i = 0; i <= 10; i++) { Console.WriteLine("{0}!={1}", i, Factoil(i)); } } public static int Factoil(int numb... 阅读全文
posted @ 2011-12-13 16:46 Anleb 阅读(565) 评论(0) 推荐(1) 编辑
摘要: 案例1:static void Main(string[] args) { int i = 2; int s = -3; i = +s;//正数 Console.WriteLine(i.ToString()); i = -s;//变成负数 Console.WriteLine(i.ToString());、 }案例2:int i1 = 2; int i2 = 3; int i3 = 4; ... 阅读全文
posted @ 2011-12-13 10:24 Anleb 阅读(732) 评论(0) 推荐(1) 编辑
点击右上角即可分享
微信分享提示