#include #include #define N 10using namespace std;int maxxunhuan(int array[N] , int n){ int i,j = 0,m,c = 0; int sum = array[0],b = 0,max = 0; f...
分类:
编程语言 时间:
2015-04-16 01:09:14
阅读次数:
176
今天在做PAT题时,有一道是这样的基本方法,就是用链表做,和用数组做呗,习惯性的先用数组做了,结果出了问题 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int count, renum; 8 ...
分类:
其他好文 时间:
2015-04-16 01:08:17
阅读次数:
143
在结对开发的过程中,每个人分担不同的任务,由于我们在学习阶段,所以我自己也编写了一段小程序,但是总是缺少一个限制条件,让这段代码停下来,下面这段代码是我的同伴编写的,我只是做了一个测试。#includeusing namespace std;void main(){ int length; ...
分类:
编程语言 时间:
2015-04-16 01:07:27
阅读次数:
137
1 class Mem 2 { 3 public int i; 4 public Mem(int i) 5 { 6 this.i = i; 7 System.out.println("create Mem: " + i); 8 } 9...
分类:
编程语言 时间:
2015-04-16 01:06:30
阅读次数:
234
namespace 赶羊递归 { class Program { public int jisuan(int day) //创建一个函数,输入day计算出羊的总数 { int sum=0; if(day==7) { sum = 2; return sum; //一定要加return截止 } su.....
分类:
其他好文 时间:
2015-04-16 01:04:05
阅读次数:
352
namespace 找到一段话中第二个关键字的位置{ class Program { static void Main(string[] args) { //找第二个a string s = "cabcaceadf"; int n = s.IndexOf("a"); //找到第一个a的索引n str...
分类:
其他好文 时间:
2015-04-16 01:03:09
阅读次数:
127
namespace 运算符穷举{ class Program { static void Main(string[] args) { //123()45()68=100; 在括号里面添加+-使等式成立 int a; int b; for (int i = 0; i < 2; i++)//有0 和.....
分类:
其他好文 时间:
2015-04-16 00:59:18
阅读次数:
216
#includeusing namespace std;#define Nu 5int main(){ int a[Nu]={2,-2,4,-6,1}; cout0) { b=a[j%Nu]; if(jb) ...
分类:
编程语言 时间:
2015-04-16 00:57:14
阅读次数:
161
namespace 兔子生兔子函数递归{ class Program { static void Main(string[] args) { Console.WriteLine("请输入你想知道兔子哪个月的数量:"); int m = Convert.ToInt32(Console.ReadLine...
分类:
其他好文 时间:
2015-04-16 00:56:28
阅读次数:
188
strncmp int?ho_strncmp(const?char?*s1,?const?char?*s2,?size_t?n)?{
????char?*s?=?(char?*)s1;
????int?c;
????while?(n--?&&?!(c?=?*s?-?*s2)?&&?*s)?
???????...
分类:
其他好文 时间:
2015-04-15 23:50:58
阅读次数:
380