摘要: namespace 运算符穷举{ class Program { static void Main(string[] args) { //123()45()68=100; 在括号里面添加+-使等式成立 int a; int b; for (int i = 0; i < 2; i++)//有0 和... 阅读全文
posted @ 2015-04-15 22:46 XCml 阅读(137) 评论(0) 推荐(0)
摘要: namespace 兔子生兔子函数递归{ class Program { static void Main(string[] args) { Console.WriteLine("请输入你想知道兔子哪个月的数量:"); int m = Convert.ToInt32(Console.ReadLine... 阅读全文
posted @ 2015-04-15 22:42 XCml 阅读(739) 评论(0) 推荐(0)
摘要: namespace 找到一段话中第二个关键字的位置{ class Program { static void Main(string[] args) { //找第二个a string s = "cabcaceadf"; int n = s.IndexOf("a"); //找到第一个a的索引n str... 阅读全文
posted @ 2015-04-15 22:39 XCml 阅读(156) 评论(0) 推荐(0)
摘要: namespace 赶羊递归 { class Program { public int jisuan(int day) //创建一个函数,输入day计算出羊的总数 { int sum=0; if(day==7) { sum = 2; return sum; //一定要加return截止 } su... 阅读全文
posted @ 2015-04-15 22:36 XCml 阅读(206) 评论(0) 推荐(0)