标签:get log code foo bsp div return etc stdio.h
/* #include "stdio.h" #define SIZE 8 int data[SIZE] = {0,1,2,3,4,5,6,7}; void preOrder(int N); void midOrder(int N); void behOrder(int N); int main(){ //preOrder(1); //midOrder(1); // behOrder(1); getchar(); } //前序遍历 void preOrder(int N){ if (N >=SIZE/2){ printf("%c\n",data[N]+64); return; } printf("%c\n",data[N]+64); preOrder(N*2); preOrder(N*2+1); } //中序遍历 void midOrder(int N){ if (N >=SIZE/2){ printf("%c\n",data[N]+64); return; } midOrder(N*2); printf("%c\n",data[N]+64); midOrder(N*2+1); } //后序遍历 void behOrder(int N){ if (N >=SIZE/2){ printf("%c\n",data[N]+64); return; } behOrder(N*2); behOrder(N*2+1); printf("%c\n",data[N]+64); } */ /* #include "stdio.h" #include "math.h" int foo(int result,int v); int main(){ long N =0x12345678; long result =0; result = foo(result,N); printf("%x",result); getchar(); } long foo(long result,long v){ int flag = 9; while(v%16){ flag --; result += v%16; result *=16; v/=16; } return result; } */
标签:get log code foo bsp div return etc stdio.h
原文地址:http://www.cnblogs.com/linux0537/p/6066709.html