आसान 0 हल किए गए 0% स्वीकृति

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

सीमाएँ

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

उदाहरण

उदाहरण 1
इनपुट:
full_name = "Ada Lovelace"

अपेक्षित आउटपुट:
expected = "AL"
इनपुट:
std::string full_name = "Ada Lovelace";

अपेक्षित आउटपुट:
std::string expected = "AL";
इनपुट:
string full_name = "Ada Lovelace";

अपेक्षित आउटपुट:
string expected = "AL";

व्याख्या

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

उदाहरण 2
इनपुट:
full_name = "grace  brewster  hopper"

अपेक्षित आउटपुट:
expected = "GBH"
इनपुट:
std::string full_name = "grace  brewster  hopper";

अपेक्षित आउटपुट:
std::string expected = "GBH";
इनपुट:
string full_name = "grace  brewster  hopper";

अपेक्षित आउटपुट:
string expected = "GBH";

व्याख्या

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

संदर्भ

यह चुनौती CodeUtility के लिए अनुकूलित की गई है। ऊपर दिए गए स्टेटमेंट और सीमाओं का पालन करें।

दूसरों से सीखें

समुदाय समाधान

अभी तक कोई प्रकाशित समाधान नहीं। पहला साझा करने के लिए इस चुनौती को हल करें।