摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1数组 { class Program { static void Main... 阅读全文
posted @ 2016-05-09 02:05 小飛 阅读(157) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(s... 阅读全文
posted @ 2016-05-07 21:34 小飛 阅读(246) 评论(1) 推荐(0)
摘要: //猜拳 //三局两胜,电脑连赢两局,或者玩家连赢两局,2局结束 //电脑赢一局,玩家赢一局,3局 //平局,不知道几局才能结束了, //只要是电脑或是玩家赢了2局,那么就结束,否则继续 //break结束循环 //continue结束当前次循环,进入下一次循环 int count1 = 0; int count2 = 0; for (; ; ) { Console.Write("请输入您... 阅读全文
posted @ 2016-05-05 22:05 小飛 阅读(212) 评论(0) 推荐(0)
摘要: 异常语句 阅读全文
posted @ 2016-05-05 21:54 小飛 阅读(222) 评论(0) 推荐(0)
摘要: //1、一张150元购物卡,三类洗化用品,洗发水15元,香皂2元,牙刷5元 //求刚好花完150元,有多少种买法,每种买法各买几样? //洗发水 x 香皂 z 牙刷 y int count = 0; int bian = 0; for (int x = 0; x = 0 && a <= 100) { for (int i = 0; i <= a; ... 阅读全文
posted @ 2016-05-04 21:56 小飛 阅读(235) 评论(0) 推荐(0)
摘要: //打印数字,0,1,8,10,12,每一个数单独占一行 //在全部数字打印完毕之后在打印数字的个数和所有数的和 int count = 0; int sum = 0; for (int i = 0; i <= 12; i++){ switch (i) { case 0: Console.Write 阅读全文
posted @ 2016-05-04 00:05 小飛 阅读(3664) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace ConsoleApplication1{ class P 阅读全文
posted @ 2016-05-02 22:49 小飛 阅读(227) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace ConsoleApplication1{ class P 阅读全文
posted @ 2016-04-29 23:27 小飛 阅读(169) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace ConsoleApplication1{ class P 阅读全文
posted @ 2016-04-28 23:08 小飛 阅读(239) 评论(0) 推荐(0)
摘要: //语句的分类 //语句顺序 //分支语句(选择语句) //循环语句 //分支语句 //if(表达式) //表达式返回值是True或False //int a = 113; //if (a <= 100) //{ // Console.WriteLine("您输入的数是小于等于100的。"); // 阅读全文
posted @ 2016-04-27 22:20 小飛 阅读(208) 评论(0) 推荐(0)