2015年9月10日
摘要: 重定向方式读写文件#include #define LOCALint main(){ #ifdef LOCAL freopen("input.txt","r",stdin); //使得scanf从文件input.txt读入 //r只读,如果文件不存在,出错 ... 阅读全文
posted @ 2015-09-10 21:22 cnxo 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 重定向方式读写文件#include #define LOCALint main(){ #ifdef LOCAL freopen("input.txt","r",stdin); //使得scanf从文件input.txt读入 //r只读,如果文件不存在,出错 ... 阅读全文
posted @ 2015-09-10 21:22 cnxo 阅读(496) 评论(0) 推荐(0) 编辑
摘要: /**有2个整数a,b,有用户输入1,2,或3,如输入1,程序就给出a和b中大者,输入2,就给出a和b中小者,输入3,就给出a和b的和**/#include #include int main(){ int f(int x,int y,int (*p)(int ,int ))... 阅读全文
posted @ 2015-09-10 15:04 cnxo 阅读(201) 评论(0) 推荐(0) 编辑
摘要: /**输入2个整数,然后让用户选择1或2,选1时调用max函数,输出2者中的大数,选2时调用min函数,输出2者中的小数**/#include #include int main(){ int max(int x,int y); int min(int x,int y)... 阅读全文
posted @ 2015-09-10 14:34 cnxo 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 《吾念谁悲》 深夜半瓶酒, 天涯何处有. 莫问她人在, 莫痴吾念谁. 谁人为汝醉, 谁人为汝悲. ... 阅读全文
posted @ 2015-09-10 13:58 cnxo 阅读(144) 评论(0) 推荐(0) 编辑