摘要:非递归实现代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<stdio.h>intsearch(intnum[],intn,intkey){intlow=0;inthigh=n-1;intmid=0;while(low&...
阅读全文
摘要:题目:棋盘中只有将帅,列出他们的所有合法位置,要求只用一个变量 。代码1:[代码]intmain(){chari=81;while(i--){if(i/9%3==i%9%3)continue;printf("i=%d,A=%d,B=%d\n",i,i/9+1,i%9+1);}return0;}代码2:代码Code highlighting produced by Actipro CodeHighl...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>usingnamespacestd;structstudent//定义结构体{intdata;student*next;};//创建链表student*...
阅读全文