链接

[http://acm.hdu.edu.cn/showproblem.php?pid=1161]

题意

把字符串中大写字母变为小写 。

分析

主要是含有空格的字符串如何读入,用getline(cin,s);

代码

#include<iostream>
#include<string>
using namespace std;
#define ll long long
int main(){ //freopen("in.txt","r",stdin);
string s;
while(getline(cin,s)){
int i;
for(i=0;i<s.length();i++)
{
if(s[i]>='A'&&s[i]<='Z')
cout<<char(s[i]+32);
else cout<<s[i];
}
cout<<endl;
}
return 0;
}

Eddy's mistakes HDU的更多相关文章

  1. HDOJ/HDU 1161 Eddy's mistakes(大写字母转换成小写字母)

    Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for e ...

  2. Eddy's mistakes(字母大小写转换)strlwr函数的应用

    Problem Description Eddy usually writes  articles ,but he likes mixing the English letter uses, for ...

  3. (最小生成树)Eddy's picture -- hdu -- 1162

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=1162 Time Limit: 2000/1000 MS (Java/Others)    Memory ...

  4. Eddy's mistakes

    Problem Description Eddy usually writes  articles ,but he likes mixing the English letter uses, for ...

  5. HDU1161 Eddy&#39;s mistakes

    Eddy's mistakes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  6. Eddy's problem partI

    Eddy's mistakes[HDU1161] Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java ...

  7. 容斥原理&&莫比乌斯专题

    A题:A - Eddy's爱好   HDU - 2204 具体思路:如果是求n中,为平方数的有多少个,那么答案肯定是sqrt(n),同理,如果是三次根号的话,那么答案肯定是n的三分之一次方.然后继续按 ...

  8. HDUOJ---1133(卡特兰数扩展)Buy the Ticket

    Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  9. HDU 1162 Eddy's picture (最小生成树)(java版)

    Eddy's picture 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1162 ——每天在线,欢迎留言谈论. 题目大意: 给你N个点,求把这N个点 ...

随机推荐

  1. VMware导入OVF时报错(未能部署OVF包用户取消了任务的解决办法)

    阅读目录: 1.问题 2.原因 3.解决方案 问题:部署OVF模版的时候报错“用户取消了任务” 原因:导出ovf模板时,虚拟CD-ROM的选项要选[客户端设备],否则导入时报错“用户取消了任务” 解决 ...

  2. MySQL 1130 - Host 127.0.0.1 is not allowed to connect to this MySQL server

    在开发中为了让开发更方便,在本地配置环境,希望可以直接访问服务器上的MySQL数据库,更方便的管理数据库, 需要在本地远程连接linux服务器的本地数据库,直接用数据库管理工具连接出现如下报错1130 ...

  3. TGJSBridge使用

    .在ViewController.h中 #import <UIKit/UIKit.h> #import "TGJSBridge.h" @interface BaseVi ...

  4. C#各种对话框

    1.选取文件夹的FolderBrowserDialog fbd = new FolderBrowserDialog();fbd.SelectedPath = "D:\Test";i ...

  5. 什么是CPU密集型、IO密集型?

    CPU密集型(CPU-bound) CPU密集型也叫计算密集型,指的是系统的硬盘.内存性能相对CPU要好很多,此时,系统运作大部分的状况是CPU Loading 100%,CPU要读/写I/O(硬盘/ ...

  6. python下载脚本

    #/usr/bin/env python#coding:UTF-8import timeimport os,sysimport urllib2 url = 'http://downloaduat.la ...

  7. 如何解决JSP页面顶端报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    题目有点长,昨天刚接触jsp,按照网上的教程安装完 tomcat 和 eclipse EE 之后,新建jsp文件却出现了如下报错: The superclass "javax.servlet ...

  8. Semaphore实现的生产者消费者程序

    Semaphore:Semaphores are often used to restrict the number of threads than can access some (physical ...

  9. 【转】字符编码笔记:ASCII、Unicode、UTF-8 和 Base64

    1. ASCII码 我们知道,在计算机内部,所有的信息最终都表示为一个二进制的字符串.每一个二进制位(bit)有0和1两种状态,因此八个二进制位就可以组合出256种状态(-128~127),这被称为一 ...

  10. blinker语音控制Arduino/esp8266开关灯-滑动条使用-文本框交互

    总链接:  https://www.arduino.cn/thread-78393-1-1.html 语音控制:https://doc.blinker.app/?file=005-App%E4%BD% ...