#P5704. 【深基2.例6】字母转换

【深基2.例6】字母转换

Letter Case Conversion

Problem Source

Luogu P5704

Problem Description

Input a lowercase letter and output its corresponding uppercase letter. For example, if the input is q (followed by a newline), the output should be Q.

Input Format

One line containing a single visible ASCII lowercase character.

Output Format

One line containing the corresponding uppercase character.

Sample Input

q

Sample Output

Q

Hint

  • The input is a character, not a number — read it with a char type: char c; cin >> c;
  • You do not need to memorize an ASCII lookup table: check the ASCII table and see how far apart a lowercase letter and its uppercase counterpart are. Characters can be added to and subtracted from integers.
  • Verify with the sample: input q should output Q.