2014年2月15日

JavaScript处理字符串--参照W3C

摘要: 使用 indexOf() 来定位字符串中某一个指定的字符首次出现的位置------------------------------------------------------------------------------------------使用 match() 来查找字符串中特定的字符,并且如果找到的话,则返回这个字符------------------------------------------------------------------------------------------使用 replace() 方法在字符串中用某些字符替换另一些字符。------------ 阅读全文

posted @ 2014-02-15 13:00 小马哥~程序之美 阅读(304) 评论(0) 推荐(0) 编辑

2014年2月12日

C#输入排序-冒泡

摘要: 1 using System.Collections.Generic; 2 using System.Linq; 3 using System.Text; 4 namespace MP 5 { 6 class Pro 7 { 8 public void f... 阅读全文

posted @ 2014-02-12 17:49 小马哥~程序之美 阅读(177) 评论(0) 推荐(0) 编辑

enum举例

摘要: #include#includeenum day{sun=0,mon,tue,wed,thu,fri,sat};enum day tomorrow(enum day d){enum day nd; switch(d){ case sun: nd=mon;break; case mon: nd=tue;break; case tue: nd=wed;break;case wed: nd=thu;break; case thu: nd=fri;break; case fri: nd=sat;break; case sat: nd=sun;break; } return (nd);}int m... 阅读全文

posted @ 2014-02-12 17:42 小马哥~程序之美 阅读(145) 评论(0) 推荐(0) 编辑

2013年11月30日

C# 表达式计算器----数据结构

摘要: using System;using System.Collections.Generic;using System.Linq; using System.Text;using System.Collections;namespace ConsoleApplication7{ class Calculator { static void Main(string[] args) { //string exp = "345*2^(4+2*2-1*3)-5"; for (; ; ) { Console.WriteLine("input a values:"); 阅读全文

posted @ 2013-11-30 23:04 小马哥~程序之美 阅读(1021) 评论(0) 推荐(0) 编辑

C# 测试单词的完美度

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; using System.Text; 4 namespace wordperfecTest 5 { 6 class Program 7 { 8 static void Main(string[] args) 9 { 10 Console.WriteLine("game specification:"); 11 Console.WriteLine("F... 阅读全文

posted @ 2013-11-30 22:42 小马哥~程序之美 阅读(180) 评论(0) 推荐(0) 编辑

2013年11月9日

C# 求N的阶乘-递归深度讲解

摘要: static void Main(){Console.WriteLine("P(n) n equal 0:"); Console.WriteLine("result:{0}", P(0)); Console.WriteLine("P(n) n equal 1:");Console.WriteLine("result:{0}", P(1));Console.WriteLine("P(n) n equal 2:");Console.WriteLine("result:{0}", 阅读全文

posted @ 2013-11-09 17:43 小马哥~程序之美 阅读(1404) 评论(0) 推荐(0) 编辑

导航