fprintf与fscanf
2015-11-13 13:41
120 查看
#include <stdio.h> int main() { //printf("Please input the value a:\n"); 等于下一句 fprintf(stdout, "Please input the value a:\n"); int a; //scanf("%d",&a); 等于下一句 fscanf(stdin,"%d",&a); if(a<0){ fprintf(stderr, "The value must > 0\n"); return 1; }else{ fprintf(stdout, "The value a is %d\n",a); } return 0; }
相关文章推荐
- 20135305姚歌 20135310陈巧然 实验二:固件设计
- Git远程操作详解
- Hibernate操作时间需要注意的问题
- linux crontab 命令详解
- 用logstash发邮件告警
- 【个人总结】win10 + ubuntu双系统安装(easyBCD引导)
- 多太与异常动手动脑
- MongoDb 查询时常用方法
- QT creator创建的界面被VS2010使用
- Linux系统Java连接Mysql数据库
- undefined reference to 'pthread_create'解决方法
- shell基础之脚本执行,命令别名以及快捷键等
- Fresco Fbcore源码分析_executor(二)
- linux错误2002
- mysql批量更新多条数据的写法
- 更加“亲民”的EPT总决赛
- (转载) IBM DB2数据库odbc配置步骤详解
- hdu-1593 find a way to escape(贪心,数学)
- Mr. Process的一生-Linux内核的社会视角 (2)启动
- POJ--1679--The Unique MST