On the reading-corner shelf labels, every word of a book title starts with a capital. Write title_case(title): words are separated by one space; make the first letter of each a capital and leave the rest alone. An empty title stays empty.
title_case("the little prince")→'The Little Prince'title_case("")→''string title_case(string title)#include <string>
#include <cctype>
using namespace std;
string title_case(string title) {
for (int i = 0; i < title.size(); i++) {
// your code here: at the start or after a space, make title[i] a capital
}
return title;
}
Run tries the examples. When they look right, Submit.