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 ...
随机推荐
- 20179205《Linux内核原理与分析》第一周作业
输出 shiyanlou 图形字符的命令banner: 新建用户wangyazhe,输入密码不会显示出来: 利用sudo adduser添加一个用户 loutest,mkdir创建一个新的文件夹opt ...
- jQuery Validate插件 验证实例
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation Validate手册: http://www.cnblogs.co ...
- VPS速度测试(4):上传下载速度、服务器带宽、Ping响应时间
1.VPS的速度好坏经常是我们选择某一个VPS商家的重要参考指标,对于国外的VPS主机我们可以执行以下命令来测试VPS入口带宽是多少. wget https://cachefly.cachefly.n ...
- 如何在阿里云esc上安装wordpress
本人的个人网纱建好,但是由于新申请的域名还没有备案 所以暂时无法通过域名访问. 1.按顺序边看边跟着做基本上你能够很优雅的完成大部分设置. http://bbs.aliyun.com/read/162 ...
- 数据库简述(以MySQL为例)
一.数据库中的概念 1.数据库是用户存放数据.访问数据.操作数据的存储仓库,用户的各种数据被有组织地存放在数据库中.可以随时被有权限的用户查询.统计.添加.删除和修改.可以说,数据库是长期存储在计算机 ...
- 用JavaScript简单判断浏览器类型
判断浏览器类型 /** * 判断浏览器类型 * 返回表示浏览器类型的字符串 */ function whoIsMe(){ var explorer = navigator.userAgent; if( ...
- 前趋图和PV操作
- Dubbo简单DEMO以及重要配置项
DEMO pom.xml 消费方和服务提供方一致 <properties> <spring.version>4.0.6.RELEASE</spring.version&g ...
- LeetCode解题报告—— Number of Islands & Bitwise AND of Numbers Range
1. Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of island ...
- C#发送Post请求,带参数,不带参数,指定参数
1.不带参数发送Post请求 /// <summary> /// 指定Post地址使用Get 方式获取全部字符串 /// </summary> /// <param na ...