ZSTUOJ刷题11:Problem D.--零起点学算法106——首字母变大写
Problem D: 零起点学算法106——首字母变大写
Time Limit: 1 Sec Memory Limit: 64 MB
Submit: 18252 Solved: 5211
Description
Input
Output
Sample Input
i like acm
i want to get an accepted
Sample Output
I Like Acm
I Want To Get An Accepted
代码如下:
#include<bits/stdc++.h>
using namespace std; int main(){
char a[101];
while(gets(a)!=NULL){
a[0]=toupper(a[0]);
for(int i=1;i<(int)strlen(a);i++){
if(a[i]==' ') a[i+1]=toupper(a[i+1]);
}
printf("%s\n",a);
} return 0;
}
ZSTUOJ刷题11:Problem D.--零起点学算法106——首字母变大写的更多相关文章
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem F: 零起点学算法101——统计字母数字等个数
#include<stdio.h> #include<string.h> int main(){ ]; while(gets(str)!=NULL){ ,b=,c=,d=; ; ...
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
- Problem E: 零起点学算法34——3n+1问题
#include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...
- Problem K: 零起点学算法107——统计元音
#include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...
- Problem J: 零起点学算法105——C语言合法标识符
#include<stdio.h> #include<ctype.h>//调用isalpha函数 int main() { int n; ]; while(scanf(&quo ...
- Problem I: 零起点学算法104——Yes,I can!
#include<stdio.h> int main() { ]; while(gets(a)!=NULL) { printf("I am "); printf(&qu ...
- Problem H: 零起点学算法103——查找最大元素
#include<stdio.h> #include<string.h> int main() { ]; while(gets(a)!=NULL) { ]; ;a[i]!='\ ...
随机推荐
- go 的形参
注意 记录一个 go 语言编程中,可能不小心忽略的一个点, 当函数的 出参 如果是 数组.结构体.字典 类型时,是不需要声明的,可以直接使用. 但是如果 出参 是 指针 类型,则必须要显示的声明. 代 ...
- 【运维】解决composer update出现的Discard changes [y,n,v,d,s,?]的问题
在PHP项目中,composer是一个使用非常普遍的包管理工具,在本地开发的时候出现了这个问题一搬来说问题不大,可以人为进行输入交互,但是如果是自动化发布中出现,就会等待输入导致卡住,是一个需要解决的 ...
- py06
元祖tuple 与列表类似可以存多个值,但是不同的是元祖本身不能被修改 #一:基本使用:tuple# 1 用途:记录多个值,当多个值没有改的需求,此时用元组更合适 # 2 定义方式:在()内用逗号分隔 ...
- Outlook怎么合并相同邮件?设置Outlook邮件为对话模式
选择View->勾选"Show as Conversations", 这样同一个标题的邮件就是叠在一块显示了. 不蟹,bro.
- 什么是cache
什么是cacheTo minimize the quantity of control information stored, the spatial locality property is use ...
- 解题报告:Codeforces 279C Ladder
Codeforces 279C Ladder 本题与tbw这篇博客上的题有相似思路.tbw的本来我还不会,抄了题解才过,这道题好歹自己磕半天磕出来了.到tbw做那道题我突然想明白了,再一想诶跟这里不是 ...
- Kato's inequality and subharmonic function
If $\Delta u=0$ in $\Omega\subset\mathbb{R}^n (n\geq2)$, then for $p>\frac{n-2}{n-1}$, $|Du|^p$ ...
- k8s_使用k8s部署博客系统-PV PVC(二)
PV和PVC PV(PersistentVolume)在声明的时候需要指定大小和续写模式:["ReadWriteMany","ReadWriteOnce",&q ...
- Spring事务注意事项 以及 遇到的坑
原创参考: https://www.cnblogs.com/yougewe/p/7466677.html (Spring,为内部方法新起一个事务,此处应有坑.) https://blog.csdn ...
- HTML弹窗设计二
<!DOCTYPE html><html> <head> <title>模态框弹出层.html</title> <meta http- ...