Given a string S which consists of lowercase letters from ‘a’ to ‘z’ and spaces, can you output the string again but in reverse order?
Note: please use function and recursion to solve this problem.
Format Input
The first line of the input containsT, which is the number of testcases. Each testcase consists of a single line consisting of string S.
Format Output
For each test case, output one line containing “Case #X: ” (without quotes) where X is the test case number (starting from 1) and then followed by the string S in reverse order.
Constraints
• 1 ? T ? 100
• 1 ? |S| ? 1000 (|S| means the length of string S)
• S only consists of lowercase letters from ‘a’ to ‘z’ and spaces
Sample Input (standard input)
Sample Output (standard input)
DO IT IN C LANGUAGE - BECAUSE THIS IS ALGORITHM & PROGRAMMING!