Practice
First and Last Character
EASYString Processing4 marks
Read a non-empty string. Output its first character and last character on separate lines.
Input: One non-empty string. Output: The first character, then the last character.
Example:
Input: Computer
Output: C
r
Premium is coming soon. All grading features are currently unlocked.
Sample Test Cases
Test 1: Typical word
Inputs: Computer
Expected: C
r
Test 2: Single character
Inputs: A
Expected: A
A