Alle Herausforderungen
Einfach 0 gelöst 0% Erfolgsquote

Initials From a Name

Build uppercase initials from a full name.

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".

Einschränkungen

1 ≤ length of full_name ≤ 200; it contains at least one letter

Beispiele

Beispiel 1
Eingabe:
full_name = "Ada Lovelace"

Erwartete Ausgabe:
expected = "AL"
Eingabe:
std::string full_name = "Ada Lovelace";

Erwartete Ausgabe:
std::string expected = "AL";
Eingabe:
string full_name = "Ada Lovelace";

Erwartete Ausgabe:
string expected = "AL";

Erläuterung

A from Ada and L from Lovelace: "AL".

Beispiel 2
Eingabe:
full_name = "grace  brewster  hopper"

Erwartete Ausgabe:
expected = "GBH"
Eingabe:
std::string full_name = "grace  brewster  hopper";

Erwartete Ausgabe:
std::string expected = "GBH";
Eingabe:
string full_name = "grace  brewster  hopper";

Erwartete Ausgabe:
string expected = "GBH";

Erläuterung

Extra spaces don't matter; the initials are uppercased: "GBH".

Referenzen

Diese Aufgabe wurde für CodeUtility angepasst. Beachte die oben genannten Vorgaben und Einschränkungen.

Von anderen lernen

Community-Lösungen

Noch keine veröffentlichten Lösungen. Löse die Aufgabe und teile als Erster eine Lösung.