用scanf判断是不是行末尾
来源:互联网 发布:博客打水软件 编辑:程序博客网 时间:2024/05/18 19:42
int main(void){int a[5],len;char endline;for (int i = 0; i < 5; ++i){scanf("%d%c",&a[i],&endline);len=i+1;if(endline=='\n') break;//遇到回车就停止}// for (int i = 0; i < len; ++i)// {// printf("a[%d]=%d\n",i,a[i] );// }// int b[5];// for (int i = 0; i < 5; ++i)// scanf("%d",&b[i]);// for (int i = 0; i < 5; ++i)// printf("b[%d]=%d\n",i,b[i] );return 0;}
如何用scanf判断是不是回车
0 0
- 用scanf判断是不是行末尾
- 判断数字的末尾是不是.0结束
- 判断scanf接收的是不是一组纯数字
- 用CFile判断文件末尾
- 用堆栈判断字符串是不是回文
- 用if多分支判断是不是素数
- 函数:判断是不是闰年;判断是不是素数
- 判断字符串是不是数字
- script判断是不是数组
- 判断字符串是不是GB2312?
- 判断是不是合法手机
- 判断是不是合法手机
- 判断字符是不是数字
- 判断一个时间是不是星期六
- 判断字符是不是回文
- 判断是不是回文数
- 判断是不是PE文件
- 判断字符串是不是回文
- NSCalendar日历类
- [leetcode]Fraction to Recurring Decimal
- DbUtils 中ResultSetHandler接口的九大实现对象
- 抓报错对应的SQL
- 实现combobox模糊查询的时候报错 InvalidArgument=“0”的值对于“index”无效
- 用scanf判断是不是行末尾
- 5月2日至7月初培训学习期间计划书
- Git工作结构
- VideoView的使用
- 转【玩转cocos2d-x之二十五】数据结构CCArray
- poj 3666 Making the Grade
- 调用DisplayMetrics类获取手机分辨率
- 看源代码那些事
- 简单html音乐播放器