2015年4月29日
posted @ 2015-04-29 14:59
Evence
阅读(1)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 int main(int argc, char* argv[]) 5 { 6 char *s[]={"man","woman","girl","boy","sister"}; 7 char* *q=NULL; ...
阅读全文
posted @ 2015-04-29 11:14
Evence
阅读(488)
推荐(0)
摘要:
//题目:编写一个函数,输入n为偶数时,调用函数求1/2+1/4+...+1/n,当输入n为奇数时,调用函数 1/1+1/3+...+1/n(利用指针函数) 1 #include 2 #include 3 4 double peven(int n) //当in...
阅读全文
posted @ 2015-04-29 09:09
Evence
阅读(295)
推荐(0)
2015年4月28日
摘要:
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int main(int argc, char* argv[]) 8 { 9 char ch[1024];10 gets(...
阅读全文
posted @ 2015-04-28 14:33
Evence
阅读(259)
推荐(0)
2015年4月27日
摘要:
1 #include 2 #include 3 4 void test() 5 { 6 int a=0; 7 static int b=0; //【skill】相当于定义了全局变量 8 printf("int a:%d static int b...
阅读全文
posted @ 2015-04-27 21:37
Evence
阅读(1156)
推荐(0)
摘要:
1 //本段代码 使用2种子函数变量传入方式 和 3种子函数变量传出方式 2 #include 3 #include 4 int caculate(int *a,int b, int c); 5 int main() 6 { 7 int *A; 8 int s0=16,s1=2 ,...
阅读全文
posted @ 2015-04-27 16:42
Evence
阅读(1390)
推荐(0)
2015年4月26日
摘要:
1 #include 2 #include 3 #include 4 int main(int argc, char* argv[]) 5 { 6 while(1) 7 { 8 for(int i=0 ; i0 ; --i)17 {18 ...
阅读全文
posted @ 2015-04-26 22:07
Evence
阅读(169)
推荐(0)
摘要:
1 #include 2 #include 3 #include 4 5 void P(int* arr) //打印数组 6 { 7 for(int i=0 ; iarr[j+1])21 {22 int tmp...
阅读全文
posted @ 2015-04-26 11:00
Evence
阅读(189)
推荐(0)
2015年4月25日
摘要:
1 #include 2 void P(int a[][3]) //【warning】二维数组必须给出列的具体数据 3 { 4 for(int i=0 ; i<3 ; ++i) 5 { 6 for(int j=0 ; j<3 ;++j) 7 ...
阅读全文
posted @ 2015-04-25 09:44
Evence
阅读(7946)
推荐(0)
2015年4月22日
摘要:
1 #include 2 #include 3 using namespace std; 4 const int N=10; 5 int main() 6 { 7 int arr[10],odd[10],even[10]; 8 while(scanf("%d",&arr[0])!=...
阅读全文
posted @ 2015-04-22 19:47
Evence
阅读(313)
推荐(0)