Total Characters
Lesson 3 of 5 in Coddy's Simple Character Counter using C++ course.
Challenge
EasyNow, you have the user's input, count the number of characters in the string and output it like this (with a new line):
Total characters: XXExclude spaces.
Delete the output of user's input from previous lesson.
Try it yourself
#include <iostream>
#include <string>
using namespace std;
int main() {
string text;
cout << "Enter text:" << endl;
getline(cin, text);
cout << text;
return 0;
}