九度题目1182:统计单词
来源:互联网 发布:linux w3m 使用 编辑:程序博客网 时间:2024/05/29 03:56
http://ac.jobdu.com/problem.php?pid=1182
2002年华中科技大学计算机研究生机试真题
将输入一行字符串转为单个输入单词,每次输出个数,若最后一个字符是.则结束本行输入
熟悉双重while循环的输入方式
#include <stdio.h>#include <string.h>char str[1000];int main(){freopen("D:\\1.txt","r",stdin);int i; while (scanf("%s",str)!=EOF) { int len=strlen(str); if (str[len-1]=='.') { printf("%d\n",len-1); continue; } else printf("%d ",len); while (1) { scanf("%s",str); len=strlen(str); if (str[len-1]=='.') { printf("%d\n",len-1); break; } else printf("%d ",len); } }}
- 九度OJ 题目1182:统计单词
- 九度题目1182:统计单词
- 九度题目1182:统计单词
- 【九度OJ】题目1182:统计单词 解题报告
- 题目1182:统计单词
- 题目1182:统计单词
- 题目1182:统计单词
- 题目1182:统计单词
- 题目1182:统计单词
- 题目1182:统计单词
- 题目1182:统计单词
- 九度oj-1182-统计单词
- 【九度OJ】1182:统计单词
- 九度oj1182:统计单词
- 九度OJ 1182:统计单词 (计数)
- 题目1361:翻转单词顺序-九度
- 九度 题目1361:翻转单词顺序
- 九度题目1111:单词替换
- C++ 虚函数表解析 .
- Sublime Text2 破解注册方法
- 20130308登录和注册
- Windows 8走向失败的5个原因
- Shell 编程14(脚本调试技术)
- 九度题目1182:统计单词
- 浅析busybox-1.12.0中ash的脚本命令局限性
- iOS程序之事件处理流程
- "undefined reference to" 问题解决方法
- RetainCount2
- Linux操作系统下的多线程编程详细解析
- yum 更新时,发生错误,解决方法
- ZOJ 2727 List the Books
- shell backgound and base