I am able to figure out the number of letters and spaces (the answer is 300) with the code below. How do I write a command to exclude the spaces? A hint would be appreciated. Thank you.
'''
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
// Prompt for text from the user
string s = get_string("Input: ");
// Count number of characters up until '\0'
int n = 0;
while (s[n] != '\0')
{
n++;
}
printf("%i\n", n);
}
'''