摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>int jiecheng(int num);int sum(int n);main(){ int num=0; scanf("%d",&num); //int rs=jiecheng(num); //printf("%d",rs); int sum1=0; int sum2=0; int num2; if(num%2==0){//是偶数 num2=num-1; }else{ num2=num-1; . 阅读全文
posted @ 2013-03-13 14:11 cart55free99 阅读(304) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>main(){ int m1=0;//指向最大数的下标 int m2=0;//指向次大数的下标 int a[4][5]={ 1,2,4,9,8, -1,4,9,6,8, 12,9,8,7,0, 7,8,9,7,0 }; int j=0; int i=0; for(;j<5;j++){ for(i=0;i<4;i++){ int temp=0;... 阅读全文
posted @ 2013-03-13 14:02 cart55free99 阅读(183) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>void toBin(int num,int arr[]);void andOp(int aBin[],int bBin[]);main(){int a;printf("input first\n");scanf("%d",&a);int b;printf("input se\n");scanf("%d",&b);int aBin[8]={0,0,0,0 阅读全文
posted @ 2013-03-13 14:00 cart55free99 阅读(264) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>main(){char fnames[5][6]={"1.txt","2.txt","3.txt","4.txt","5.txt"};//初始化的时候需要注意 乍一看以为每个分量都是长度为5的字串 没错//但是这些长度为5的字串所占的空间并不是5 而是6 因为还需要结束符 //如果前面定义为char fnames[5][5]的话 会有array bo 阅读全文
posted @ 2013-03-13 13:59 cart55free99 阅读(305) 评论(0) 推荐(0) 编辑