解题思路:
注意事项:
参考代码:
#include<iostream> #include<cstring> #include<cstdio> #include<cctype> using namespace std; int main() { char a[105]; while(gets(a)) { int n=strlen(a); if(islower(a[0])) a[0]-=32; for(int i=1;i<n;i++) { if(islower(a[i])&&(a[i-1]==' '||a[i-1]=='\t'||a[i-1]=='\r'||a[i-1]=='\n')) a[i]-=32; } cout<<a<<endl; } return 0; }
0.0分
12 人评分
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:1327 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:576 |
数对 (C语言代码)浏览:697 |
简单的a+b (C语言代码)浏览:478 |
DNA (C语言代码)浏览:391 |
蚂蚁感冒 (C语言代码)浏览:768 |
单词个数统计 (C语言代码)浏览:1009 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:984 |
C语言程序设计教程(第三版)课后习题1.6 (C语言代码)浏览:702 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:500 |