摘要: //Fibonacci序列 不解释#include "stdio.h"#define N 20int fibo(int n);void main(){ int f[N]={0}; for(int i=1; i <= N; i++) { f[i-1]=fibo(i); } for(i=0; i < N; i++) printf("%d ",f[i]); printf("\n");//今上课给我一... 阅读全文
posted @ 2011-09-24 19:29 legendmaner 阅读(184) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"void Hanoi(char a,char b,char c,int n);void main(){ Hanoi('A','B','C',3);}void Hanoi(char a,char b,char c,int n){ if(n==1) printf("%c -> %c\n",a,c); else { Hanoi(a,c,b,n-1); print... 阅读全文
posted @ 2011-09-24 19:20 legendmaner 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "stdlib.h"#include "string.h"void swap(int a,int b,char *l);void sort(char *l);void main(){ char ColorLine[]={'r','w','b','b','w','r','b','b','\0'}; char *c; printf(" 阅读全文
posted @ 2011-09-24 17:24 legendmaner 阅读(120) 评论(0) 推荐(0) 编辑
摘要: #include"STDIO.H"#define N 7#define FLAG 2int maze[N][N]={{1,1,1,1,1,1,1}, {1,0,1,0,1,0,1}, {1,0,0,0,0,1,1}, {1,0,1,0,0,0,1}, {1,0,1,0,1,0,1}, {1,0,1,0,0,0,1}, {1,1,1,1,1,1,1}};int s... 阅读全文
posted @ 2011-09-24 16:48 legendmaner 阅读(148) 评论(0) 推荐(0) 编辑