Problem G: 零起点学算法106——首字母变大写
#include<stdio.h>
#include<string.h>
int main(void)
{
char a[];
int i,k;
while(gets(a)!=NULL)
{
k=strlen(a);
if(a[]>='a'&&a[]<='z')
a[]-=;
for(i=;i<k;i++)
{
if(a[i]==' ')
{
if(a[i+]>='a'&&a[]<='z')
{
a[i+]-=;
}
}
}
printf("%s",a);
printf("\n");
}
return ;
}
考虑清情况
Problem G: 零起点学算法106——首字母变大写的更多相关文章
- Problem G: 零起点学算法102——删除字符
#include<stdio.h> #include<string.h> int main() { ],a; while(gets(ch)!=NULL) { scanf(&qu ...
- Problem G: 零起点学算法86——Fibonacc
#include<stdio.h> int main(){ ]={,,}; ;i<=;i++) { a[i]=a[i-]+a[i-]; } scanf("%d", ...
- Problem G: 零起点学算法27——等级分制度
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) +a* ...
- 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 ...
随机推荐
- arch中pacman的使用
Pacman 是archlinux 下的包管理软件.它将一个简单的二进制包格式和易用的构建系统结合了起来.不管软件包是来自官方的 Arch 库还是用户自己创建,Pacman 都能方便得管理. pacm ...
- Shell脚本 - nginx启动脚本
OS:CentOS/Redhat 系列 并在 Centos 6.7 和 Centos 7.2 上测试正常 #!/bin/bash # # auth: daxin # time: 2018/07/10 ...
- Python标准库笔记(4) — collections模块
这个模块提供几个非常有用的Python容器类型 1.容器 名称 功能描述 OrderedDict 保持了key插入顺序的dict namedtuple 生成可以使用名字来访问元素内容的tuple子类 ...
- SUSE 11.3 linux ISO下载地址
http://linux.iingen.unam.mx/pub/Linux/Suse/isos/SLES11/ SLE-11-SP3-SDK-DVD-i586-GM-DVD1.iso 6deaa960 ...
- linux平台学x86汇编语言学习集合帖
linux平台学x86汇编语言学习集合帖 linux平台学x86汇编(一):https://blog.csdn.net/shallnet/article/details/45543237 linux平 ...
- 自动化测试===Macaca环境搭建和说明书
https://www.cnblogs.com/tim2016/p/6400326.html http://www.cnblogs.com/fnng/p/5873878.html https://ww ...
- 工具安装===Sublime Text-安装
Sublime Text 是一款通用型轻量级编辑器,支持多种编程语言.有许多功能强大的快捷键(如 Ctrl+d),支持丰富的插件扩展.如果平时需要在不同编程语言间切换,那么它将会是一个,不错的选择. ...
- Python Flask数据库连接池
1. 安装pymysql pip3 install pymysql 2. 安装dbutils开源工具库 pip3 install dbutils 3. 模式一: from DBUtils.Persis ...
- 将Sphinx的日志放置到/dev/shm里需要注意的事情
可以采用定时器控制,清空日志的办法: 几种快速清空文件内容的方法: $ : > filename #其中的 : 是一个占位符, 不产生任何输出. $ > filename $ echo “ ...
- Understanding Optional and Compulsory Parameters
If the MVC Framework cannot find a value for a reference type parameter (such as a string or object) ...