HDU2026_首字母变大写
2016-11-18 18:18
330 查看
首字母变大写
http://acm.hdu.edu.cn/showproblem.php?pid=2026Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 53641 Accepted Submission(s): 29475
Problem Description
输入一个英文句子,将每个单词的第一个字母改成大写字母。
Input
输入数据包含多个测试实例,每个测试实例是一个长度不超过100的英文句子,占一行。
Output
请输出按照要求改写后的英文句子。
Sample Input
i like acm
i want to get an accepted
Sample Output
I Like Acm
I Want To Get An Accepted
Author
lcy
Source
C语言程序设计练习(四)
#include <stdio.h> int main() { char c; int i = 0; while ((c = getchar()) != EOF) { if (c == ' ') { printf(" "); i = 0; continue; } if (c == '\n') { printf("\n"); i = 0; continue; } if (i == 0) { printf("%c", c - 32); ++i; } else printf("%c", c); } return 0; }
相关文章推荐
- hdu2026 首字母变大写
- hdu2026 首字母变大写
- HDU2026 首字母变大写【入门】
- HDU2026 首字母变大写
- hdu2026 首字母变大写
- HDU2026 首字母变大写
- hdu2026(首字母变大写)
- HDU2026---首字母变大写
- HDU2026 首字母变大写
- hdu2026 首字母变大写(C语言)
- HDU2026 首字母变大写
- 1021 单个字母的小写变大写
- F - 首字母变大写
- python中把用户输入的不规范的英文名字,变为首字母大写,其他小写的规范名字。
- 串的处理 在实际的开发工作中,对字符串的处理是最常见的编程任务。本题目即是要求程序对用户输入的串进行处理。具体规则如下: 1. 把每个单词的首字母变为大写。 2. 把数字与字母之间用下划线字符(_)分
- JS将字符串首字母变为大写,其余为小写
- c# 字符串的首字母大写转换 方法
- Hdu 2026 首字母大写
- 0901假设存在一个可以从标准输入读入字母并且将其从小写转换为大写输出的可执行程序upcase
- HTML文本框录入字母自动大写