We changed our privacy policy. Read more.

Hot answers tagged


string input = get_string("Text:"); //getting input from the user int len = strlen(input); //determining the length of the string int space = 0; //declaring a variable to count whitespaces for (int i = 0; i < len; i++) //declaring a for loop to check each element of the string { if (input[i] == ' ') { space++; ...

Only top voted, non community-wiki answers of a minimum length are eligible