StringsExtendedIGCSE 0478
Output initials from two names
SUBSTRING practice: read a first name and a last name, then output the two initials.
A program reads a first name and a last name.
Write pseudocode that outputs the first letter of each name with no extra spaces.
Your program should
- Read two STRING values: first name then last name.
- Use SUBSTRING with a start position of 1 and a length of 1.
- Output the two initials next to each other, for example AK.
Sample input
Alex Kim
Sample output
AK
Starter
Pseudocode
// Read FirstName and LastName. Output the first letter of each, joined together.
DECLARE FirstName : STRING
DECLARE LastName : STRING