当前位置:网站首页>P5733 [deep foundation 6. example 1] automatic correction

P5733 [deep foundation 6. example 1] automatic correction

2022-06-26 13:02:00 A program ape who smashes the keyboard

P5733 【 Deep base 6. example 1】 Auto fix

# 【 Deep base 6. example 1】 Auto fix

## Title Description

As we all know, some office software has the function of automatically converting letters to uppercase . Enter a length no more than 100 A string that does not include spaces . It is required to change all lowercase letters in the string into uppercase letters and output .

## Input format

## Output format

## Examples #1

### The sample input #1

```
Luogu4!
```

### Sample output #1

```
LUOGU4!
```

 【AC Code 】

#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]));// Convert to uppercase if lowercase 
		cout<<s[i];
	}
	return 0;
}
Pay attention to it

 # 【 Deep base 6. example 1】 Auto fix

## Title Description

As we all know, some office software has the function of automatically converting letters to uppercase . Enter a length no more than 100 A string that does not include spaces . It is required to change all lowercase letters in the string into uppercase letters and output .

## Input format

## Output format

## Examples #1

### The sample input #1

```
Luogu4!
```

### Sample output #1

```
LUOGU4!
```

 【AC Code 】

#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]));// Convert to uppercase if lowercase 
		cout<<s[i];
	}
	return 0;
}
Pay attention to it

 # 【 Deep base 6. example 1】 Auto fix

## Title Description

As we all know, some office software has the function of automatically converting letters to uppercase . Enter a length no more than 100 A string that does not include spaces . It is required to change all lowercase letters in the string into uppercase letters and output .

## Input format

## Output format

## Examples #1

### The sample input #1

```
Luogu4!
```

### Sample output #1

```
LUOGU4!
```

 【AC Code 】

#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]));// Convert to uppercase if lowercase 
		cout<<s[i];
	}
	return 0;
}
Pay attention to it

原网站

版权声明
本文为[A program ape who smashes the keyboard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261216573505.html