Given a line of text as input, output the number of characters excluding spaces, periods, or commas.
Ex: If the input is:
Listen, Mr. Jones, calm down.
the output is:
21
Note: Account for all characters that aren't spaces, periods, or commas (Ex: "r", "2", "!").
#include <iostream>
#include <string>
using namespace std;
int main() {
string userText; // Add more variables if needed
getline(cin, userText); // Gets entire line, including spaces
// Type your code here
return 0;
}