上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要: 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 阅读(208) 评论(0) 推荐(0)
摘要: namespace 函数数组排序带出最大最小值及平均值{ class Program { static void Main(string[] args) { int[] b=new int[]{9,1,5,3,7}; int max = 0; //设置两个变量用来接收最低值与最小值。 int mi... 阅读全文
posted @ 2015-04-14 00:19 XCml 阅读(300) 评论(0) 推荐(0)
摘要: namespace 一元二次方程函数解决{ class Program { static void Main(string[] args) { while (true) { Console.WriteLine("请为一元二次方程ax²+bx+c设置相关参数:"); Console.WriteLin... 阅读全文
posted @ 2015-04-14 00:09 XCml 阅读(343) 评论(0) 推荐(0)
摘要: namespace 函数__青歌赛打分{ class Program { public int[] Array(int[] a) //排序 { int n = a.Length; for (int i = 1; i <= a.Length; i++) { for (int j = 1; j <= a... 阅读全文
posted @ 2015-04-14 00:03 XCml 阅读(177) 评论(0) 推荐(0)
摘要: namespace 随机生成手机号{ class Program { static void Main(string[] args) { while (true) { long[] array = new long[10]{13581049314,18366885682,13626435731,1... 阅读全文
posted @ 2015-04-13 23:41 XCml 阅读(395) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace 用函数把闹钟习题练一练无返回值{ class Program { public void naozhong... 阅读全文
posted @ 2015-04-12 21:35 XCml 阅读(214) 评论(0) 推荐(0)
摘要: namespace 函数冒泡排序{ class Program { static void Main(string[] args) { int[] b = new int[5] { 1,5,3,4,2}; new Program().Array(b); //数组b调用已经写好的Array函数用来排... 阅读全文
posted @ 2015-04-12 21:33 XCml 阅读(176) 评论(0) 推荐(0)
摘要: namespace 函数{ //函数的作用:提高代码的重用性,一块封闭的代码块。 //语法结构:返回值(当执行完函数之后,返回的结果的数据类型),函数名,输入参数,输出参数,函数体。 //一:无返回值,无参数的函数 /* public void dayin() //只是调用,不需要返回值 { Con... 阅读全文
posted @ 2015-04-12 21:31 XCml 阅读(266) 评论(0) 推荐(0)
摘要: namespace 火影忍者多人对战{ class Program { //创建一个Player的结构体 struct Player { public string name; public int hp; public int attack; public int defend; public i... 阅读全文
posted @ 2015-04-10 19:05 XCml 阅读(368) 评论(0) 推荐(0)
摘要: namespace 商场打折结构体{ class Program { struct ZhuangBei { public string name; public double price; public int amount; } static void Main(string[] args) {... 阅读全文
posted @ 2015-04-10 19:03 XCml 阅读(134) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页