ACM2026
/*
首字母变大写
*/
#include<iostream>
#include<cstring>
int main()
{
using namespace std;
char a[],t;
int i,l;
while()
{
cin.getline(a,); t='';
l=strlen(a);
a[]=toupper(a[]);
for(i=;i<l;i++)
if(a[i-]==' ')
a[i]=toupper(a[i]);
puts(a); }
return ;
}
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char ch[];
bool flag=;
char f;
while(gets(ch)){
int len=strlen(ch);
f=ch[]-;
cout<<f;
for(int i=;i<len;i++){
if(flag==){
f=ch[i]-;
cout<<f;
flag=;
}
else cout<<ch[i];
if(ch[i]==' ') flag=; }
cout<<endl;
}
}
ACM2026的更多相关文章
随机推荐
- MVC中的@Html.DisplayFor等方法如何控制日期的显示格式(转) - Rising
在Sql Server2005中,如果将某字段定义成日期 时间 类型DateTime,那么在视图中会默认显示成年月日时分秒的方式(如 2013/8/6 13:37:33) 如果只想显示成年 ...
- PAT-乙级-1018. 锤子剪刀布 (20)
1018. 锤子剪刀布 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 大家应该都会玩“锤子剪刀布”的游 ...
- SQLite数据库简介(转)
大家好,今天来介绍一下SQLite的相关知识,并结合Java实现对SQLite数据库的操作. SQLite是D.Richard Hipp用C语言编写的开源嵌入式数据库引擎.它支持大多数的SQL92标准 ...
- 通过SQL Server 2008 访问MySQL(转)
在公司中经常会遇到部署多种数据库环境的情况,对于开发人员来说经常在不同数据库之间转换确实有些繁琐,本篇将介绍从SQL Server 操作MySQL 数据库的方法. 数据库测试环境 1. SQL Ser ...
- List<T> 排序
List<T>的排序 List<DataPoint> dataPointsDataPints = ...; //按RegisterAddress升序排序 dataPointsD ...
- Apache Flume 简介
转自:http://blog.163.com/guaiguai_family/blog/static/20078414520138100562883/ Flume 是 Cloudera 公司开源出来的 ...
- 什么是 .manifest 文件
恩,为了大家都能很方便的理解,我将尽量简单通俗地进行描述. [现象]对这个问题的研究是起源于这么一个现象:当你用VC++2005(或者其它.NET)写程序后,在自己的计算机上能毫无问题地运行,但是当把 ...
- 一分钟明白 VS manifest 原理
什么是vs 程序的manifest文件 manifest 是VS程序用来标明所依赖的side-by-side组建,如ATL, CRT等的清单. 为什么要有manifest文件 一台pc上,用一组建往往 ...
- MetadataType的使用
MetadataType的使用,MVC的Model层数据验证指定要与数据模型类关联的元数据类 using System.ComponentModel.DataAnnotations; //指定要与数据 ...
- Oracle 学习笔记 常用查询命令篇
1.查询某个用户下有多少张表 有时候很有用 select count(*) from dba_tables t where t.owner='SCOTT';