当前位置:网站首页>P5733 【深基6.例1】自动修正
P5733 【深基6.例1】自动修正
2022-06-26 12:37:00 【暴揍键盘的程序猿】
P5733 【深基6.例1】自动修正
# 【深基6.例1】自动修正
## 题目描述
大家都知道一些办公软件有自动将字母转换为大写的功能。输入一个长度不超过 100 且不包括空格的字符串。要求将该字符串中的所有小写字母变成大写字母并输出。
## 输入格式
## 输出格式
## 样例 #1
### 样例输入 #1
```
Luogu4!
```
### 样例输出 #1
```
LUOGU4!
```
【AC代码】
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<vector>
using namespace std;
string s;
signed main()
{
cin>>s;
for(int i=0;i<s.size();i++)
{
if(islower(s[i]))s[i]=(char)(toupper(s[i]));//如果是小写就转换成大写
cout<<s[i];
}
return 0;
}
# 【深基6.例1】自动修正
## 题目描述
大家都知道一些办公软件有自动将字母转换为大写的功能。输入一个长度不超过 100 且不包括空格的字符串。要求将该字符串中的所有小写字母变成大写字母并输出。
## 输入格式
## 输出格式
## 样例 #1
### 样例输入 #1
```
Luogu4!
```
### 样例输出 #1
```
LUOGU4!
```
【AC代码】
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<vector>
using namespace std;
string s;
signed main()
{
cin>>s;
for(int i=0;i<s.size();i++)
{
if(islower(s[i]))s[i]=(char)(toupper(s[i]));//如果是小写就转换成大写
cout<<s[i];
}
return 0;
}
# 【深基6.例1】自动修正
## 题目描述
大家都知道一些办公软件有自动将字母转换为大写的功能。输入一个长度不超过 100 且不包括空格的字符串。要求将该字符串中的所有小写字母变成大写字母并输出。
## 输入格式
## 输出格式
## 样例 #1
### 样例输入 #1
```
Luogu4!
```
### 样例输出 #1
```
LUOGU4!
```
【AC代码】
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<vector>
using namespace std;
string s;
signed main()
{
cin>>s;
for(int i=0;i<s.size();i++)
{
if(islower(s[i]))s[i]=(char)(toupper(s[i]));//如果是小写就转换成大写
cout<<s[i];
}
return 0;
}
边栏推荐
猜你喜欢

Redis learning - 05 node JS client operation redis and pipeline pipeline

The laravel dingo API returns a custom error message

Tiger Dao VC products are officially launched, a powerful supplement to seektiger ecology

goto语句实现关机小程序
![Vivado 错误代码 [DRC PDCN-2721] 解决](/img/de/ce1a72f072254ae227fdcb307641a2.png)
Vivado 错误代码 [DRC PDCN-2721] 解决

The El form item contains two inputs. Verify the two inputs
![[solved] laravel completes the scheduled job task (delayed distribution task) [execute a user-defined task at a specified time]](/img/13/c2c63333a9e5ac08b339449ea17654.jpg)
[solved] laravel completes the scheduled job task (delayed distribution task) [execute a user-defined task at a specified time]

Fengshentai old shooting range Kali series

机器学习笔记 - 时间序列的季节性

Word文档导出(使用固定模板)
随机推荐
Several rare but useful JS techniques
710. 黑名单中的随机数
[esp32-C3][RT-THREAD] 基于ESP32C3运行RT-THREAD bsp最小系统
Iframe usage and contentwindow, parent and PostMessage communication methods
guacamole安装
Go 结构体方法
ES6模块
自定义封装下拉组件
记一次phpcms9.6.3漏洞利用getshell到内网域控
文件远程同步、备份神器rsync
小程序中控件里面的内容较多,让其支持滚动的良好方案
"Pinduoduo and short video speed version", how can I roast!
Adobe Acrobat prevents 30 security software from viewing PDF files or there are security risks
自动化测试的局限性你知道吗?
数字信号处理——线性相位型(Ⅰ、Ⅲ型)FIR滤波器设计(1)
TP5 thinkphp5 extension package think Mongo operation mongodb time interval range query
processsing 函数random
快手实时数仓保障体系研发实践
机组实践实验8——使用CMStudio设计基于基本模型机微程序指令(1)
processing 随机生成线动画