Problema
Take the first letter of each word in full_name, uppercase it, and join the letters. Words are separated by one or more spaces.
Implement initials(full_name).
Input
full_name: A name made of letters and spaces.
Output
Return the initials, for example "ADL".
Restricciones
1 ≤ length of full_name ≤ 200; it contains at least one letter
Ejemplos
Entrada:
full_name = "Ada Lovelace"
Salida esperada:
expected = "AL"
Entrada:
std::string full_name = "Ada Lovelace";
Salida esperada:
std::string expected = "AL";
Entrada:
string full_name = "Ada Lovelace";
Salida esperada:
string expected = "AL";
Explicación
A from Ada and L from Lovelace: "AL".
Entrada:
full_name = "grace brewster hopper"
Salida esperada:
expected = "GBH"
Entrada:
std::string full_name = "grace brewster hopper";
Salida esperada:
std::string expected = "GBH";
Entrada:
string full_name = "grace brewster hopper";
Salida esperada:
string expected = "GBH";
Explicación
Extra spaces don't matter; the initials are uppercased: "GBH".
Referencias
Este reto está adaptado para CodeUtility. Sigue el enunciado y las restricciones indicadas arriba.