take sentence input cin code example Example: getline limit input string text; getline(cin, text); text = text.substr(0, 100);