04 2015 档案
文件系统:读取,文件不存在则创建
摘要:1 #include 2 #include 3 #define WAY "save.txt" 4 int main(int argc,int argv[]) 5 { 6 FILE *fp_read,*fp_write; 7 8 fp_read=fopen(WAY,"r+"... 阅读全文
posted @ 2015-04-30 21:30 Evence 阅读(660) 评论(0) 推荐(0)
排序:正序冒泡,交错冒泡,插入排序,选择排序,快速排序
摘要:1 #include 2 #include 3 #include 4 #include 5 const int N=10; //修改随机数据量 6 bool onOroff=1; ... 阅读全文
posted @ 2015-04-30 16:00 Evence 阅读(259) 评论(0) 推荐(0)
101,102找出不同数
摘要:第一题:101个数中只有一个数字不同,找出这个数第二题:102个数字,有两个互不相同的数和其他数字不同,找出这两个数 1 int main(int argc,char* argv[]) 2 { 3 //101个数有一个不一样的 4 int arr[101]; 5 for(in... 阅读全文
posted @ 2015-04-30 14:54 Evence 阅读(316) 评论(0) 推荐(0)
打印菱形(实心+空心)
摘要:1 #include 2 #include 3 const int row=8; 4 int main() 5 { 6 for(int i=row-1 ; i>=0 ; --i) 7 { 8 for(int j=i ; j>=0 ; --j) 9 ... 阅读全文
posted @ 2015-04-29 23:22 Evence 阅读(289) 评论(0) 推荐(0)
小松鼠填树洞(memcpy版)
该文被密码保护。
posted @ 2015-04-29 15:24 Evence 阅读(1) 评论(0) 推荐(0)
小松鼠填树洞(array版)
该文被密码保护。
posted @ 2015-04-29 14:59 Evence 阅读(1) 评论(0) 推荐(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) 推荐(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 阅读(297) 评论(0) 推荐(0)
统计字母和数字,打印出直方图
摘要: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 阅读(261) 评论(0) 推荐(0)
static 定义全局变量方法
摘要: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 阅读(1159) 评论(0) 推荐(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 阅读(1393) 评论(0) 推荐(0)
大虫子
摘要: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 阅读(170) 评论(0) 推荐(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 阅读(190) 评论(0) 推荐(0)
第18题 编写程序,实现矩阵(3行3列)的转置(即行列互换)。
摘要: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 阅读(7952) 评论(0) 推荐(0)
九度OJ:题目1117:整数奇偶排序
摘要: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 阅读(314) 评论(0) 推荐(0)
九度OJ:题目1202:排序
摘要:1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 int num=0,i=0; 7 while(scanf("%d",&num)!=EOF) 8 { 9 int arr[110];... 阅读全文
posted @ 2015-04-22 19:11 Evence 阅读(144) 评论(0) 推荐(0)
九度OJ:题目1476:平方因子 AC
摘要:1 #include 2 #include 3 #include 4 bool judge(int a) 5 { 6 int sqr=sqrt(a*1.0); 7 for(int i=2 ; i<=sqr+1 ; ++i) 8 { 9 int tmp=i*i... 阅读全文
posted @ 2015-04-22 17:38 Evence 阅读(225) 评论(0) 推荐(0)
和Linux同环境的代码编译器
摘要:DevC++编程工具 v5.6.1 安装版http://www.cr173.com/soft/32009.html 阅读全文
posted @ 2015-04-18 09:45 Evence 阅读(114) 评论(0) 推荐(0)
WM11破解版
摘要:http://www.xpgod.com/soft/20115.html 阅读全文
posted @ 2015-04-17 17:47 Evence 阅读(207) 评论(0) 推荐(0)
安装系统
摘要:各种操作系统镜像下载地址http://www.msdn.hk/win10 下载链接:http://www.msdn.hk/html/2015/1496.htmlWindows 10 Technical Preview 9926 (x64) - DVD (Chinese-Simplified)发布日期... 阅读全文
posted @ 2015-04-17 10:44 Evence 阅读(240) 评论(0) 推荐(0)
linux配置问题
摘要:将vic放入home,改名为“.vimrc”,在终端编辑的时候就会有行数修改名字和邮箱:在终端输入 vim .vimrc,编辑即可安装C++编辑器:在root下输入yum install gcc-c++即可下载安装 阅读全文
posted @ 2015-04-16 17:51 Evence 阅读(119) 评论(0) 推荐(0)