03 2015 档案

摘要:namespace for嵌套for五角星{ class Program { static void Main(string[] args) { while (true) { string a = "★";//注意换行与不换行的应用,如果要去掉对角线的话往上的话只要j<=i即可。 for (int ... 阅读全文
posted @ 2015-03-31 21:39 XCml 阅读(117) 评论(0) 推荐(0)
摘要:namespace 纸张的厚度循环{ class Program { static void Main(string[] args) { while (true) { double a; Console.WriteLine("请输入纸张的厚度:(毫米)"); a =Convert.ToDouble(... 阅读全文
posted @ 2015-03-31 19:03 XCml 阅读(127) 评论(0) 推荐(0)
摘要:namespace 烧开水循环跳转{ class Program { static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Green; Console.Clear(); while (true) { st... 阅读全文
posted @ 2015-03-31 19:02 XCml 阅读(169) 评论(0) 推荐(0)
摘要:{ class Program { static void Main(string[] args) { while (true) { int sum = 0; for (int i = 1; i 49 && a <= 100) { sum = sum + 10; Console.WriteLine... 阅读全文
posted @ 2015-03-31 19:01 XCml 阅读(123) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int ct=0,xt=0,yt=1,zt=1,m; Console.WriteLine("请输入月数:"); m = Convert.ToInt32(Console.ReadLine()); for... 阅读全文
posted @ 2015-03-31 19:00 XCml 阅读(134) 评论(0) 推荐(0)
摘要:class Program { static void Main(string[] args) { while (true) { int a, b; int s = 0; Console.WriteLine("请输入第一个数:"); a = Convert.ToInt32(Console.Read... 阅读全文
posted @ 2015-03-31 18:58 XCml 阅读(136) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int a, b, c,m,n; Random r = new Random(); //主要的就是三位数的百分位最大不会同时取到四位数的百分位,也就是说c永远小于b; a = r.Next(1,10);... 阅读全文
posted @ 2015-03-30 22:39 XCml 阅读(163) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) //主要就是公式的运用和if else的嵌套 { string a, b = ""; double c, d, e,s,q; double m = 6.55 / 100 / 12; double n = 4... 阅读全文
posted @ 2015-03-30 22:30 XCml 阅读(121) 评论(0) 推荐(0)
摘要:class Program { static void Main(string[] args) { while (true) { string a; Console.WriteLine("请问你有房吗:"); a = Console.ReadLine(); if (a == "有") { Cons... 阅读全文
posted @ 2015-03-29 13:56 XCml 阅读(123) 评论(0) 推荐(0)
摘要:class Program { static void Main(string[] args) { while (true) { double i,s,a,b,c,d,e,f; Console.Write("请输入当月利润:"); i = Convert.ToDouble(Console.Read... 阅读全文
posted @ 2015-03-29 13:55 XCml 阅读(180) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Green; Console.Clear(); while (true) { Console.WriteLine("求方程式ax²+bx=c=0的根的情况... 阅读全文
posted @ 2015-03-28 15:21 XCml 阅读(327) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int a; Random r = new Random(); a = r.Next(0,24); Console.WriteLine(a); if (a >= 0 && a = 6 && a = 12... 阅读全文
posted @ 2015-03-28 15:20 XCml 阅读(685) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int x, y,z; string a, b,c; Random r=new Random();//这个是用的随机数随机生成,并且利用switch case赋予x,y,z成为"剪刀"石头""布""的含... 阅读全文
posted @ 2015-03-28 15:17 XCml 阅读(196) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { string a; Console.WriteLine("请问你有房吗:"); a = Console.ReadLine(); if (a == "有") { Console.WriteLine("请... 阅读全文
posted @ 2015-03-28 15:12 XCml 阅读(148) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { double x,y; Console.Write("请输入坐车的距离:"); x = Convert.ToDouble(Console.ReadLine()); if (x>0&&x 3 && x ... 阅读全文
posted @ 2015-03-28 13:33 XCml 阅读(275) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int m1 = 31; int m2 = 28; int m3 = 31; int m4 = 30; int m5 = 31; int m6 = 30; int m7 = 31; int m8 = 3... 阅读全文
posted @ 2015-03-27 21:14 XCml 阅读(468) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { string a; int b; Console.Write("请输入您的姓名:"); a = Console.ReadLine(); Console.Write("请输入您的分数:"); b = C... 阅读全文
posted @ 2015-03-27 21:10 XCml 阅读(533) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { Console.Write("请输入一个100以内的数:"); int a =Convert.ToInt32(Console.ReadLine()); if(a>10&&a0) { Console.W... 阅读全文
posted @ 2015-03-27 21:09 XCml 阅读(854) 评论(0) 推荐(0)
摘要:namespace 再练一遍猜拳2{ class Program { static void Main(string[] args)//首先先随机生成三个数,然后将0,1,2变成剪刀石头布,利用switch case达到,在比较的时候注意当x为0,y为2的时候,出x的获胜。即先判断这一句 x == ... 阅读全文
posted @ 2015-03-27 21:07 XCml 阅读(239) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { int b; Console.WriteLine("请输入一个100以内的整数:"); b =Convert.ToInt32( Console.ReadLine()); if (b % 7 == 0)... 阅读全文
posted @ 2015-03-27 14:13 XCml 阅读(653) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { while (true) { string xb; double sg, tz,m;: Console.Write("请输入您的性别:"); //利用逻辑运算符?:来测算体重,先判断性别。(?;)如果是男的话用100,女的话用11... 阅读全文
posted @ 2015-03-26 22:39 XCml 阅读(202) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { int a, b, c; while (true) { Console.WriteLine("请输入第一个数"); a = Convert.ToInt32(Console.ReadLine()); Console.WriteLin... 阅读全文
posted @ 2015-03-26 22:08 XCml 阅读(707) 评论(0) 推荐(0)
摘要://做一个简单的计算器 { double a, b,c; Console.WriteLine("乘法"); Console.Write("请输入第一个数:"); a = Convert.ToDouble(Console.ReadLine()); //toDoule 变成Double类型 //先输入... 阅读全文
posted @ 2015-03-26 22:07 XCml 阅读(197) 评论(0) 推荐(0)
摘要://a++;//a=a+1; // ++a;//a=a+1; //Console.WriteLine(a++);// Console.WriteLine(a);a=a+1; //Console.WriteLine(++a);// a=a+1;Console.WriteLine(a); //也就是... 阅读全文
posted @ 2015-03-26 22:00 XCml 阅读(246) 评论(0) 推荐(0)