CJCoding With Joseph
15free / daySign inCreate account

Capitalize the First Letter

Take a fully lowercase word and capitalize only its first letter, leaving the rest unchanged. You are given a string named word set to "banana". Use Substring(0, 1) with ToUpper to get the capitalized first letter, then use Substring(1) to grab everything from the second character onward, and concatenate the two pieces. Substring with a single argument returns the rest of the string starting at that index. Print the combined result.

Expected Output:

Banana

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.