Upper Case

Easy
0/40
profile
Contributed by
2 upvotes

Problem statement

You are given a string consisting of only lowercase English alphabet letters. Your task is to convert the string into uppercase English alphabet letters.

For Example:
If str = “coding”, the uppercase of the string will be “CODING”.
Hence, the output is “CODING”.
Detailed explanation ( Input/output format, Notes, Images )

Input Format :

The first line of the input contains an integer, 'T’, denoting the number of test cases.

The first line of each test case will contain a non-empty string.
Output Format :
For each test case, print the string consisting of uppercase English alphabet letters. 

Print a separate line for each test case.
Note :
You do not need to print anything, it has already been taken care of. Just implement the given function.
Constraints:
1 <= T <= 10
1 <= str.length <= 10000

Time limit: 1 sec
Sample Input 1 :
2
coding
ninjas
Sample output 1 :
CODING
NINJAS
Explanation For Sample Output 1:
For the first test case,
str = “coding”, the uppercase of the string will be “CODING”.
Hence, the output is “CODING”.

For the second test case,
str = “ninjas”, the uppercase of the string will be “NINJAS”.
Hence, the output is “NINJAS”.
Sample Input 2 :
2
abcd
aba
Sample output 2 :
ABCD
ABA
Approaches (1)
Implementation
Time Complexity
Space Complexity
Code Solution
(100% EXP penalty)
Upper Case
Full screen
Console