Skip to content

Instantly share code, notes, and snippets.

@al3rez
Last active April 21, 2016 16:10
Show Gist options
  • Save al3rez/26befbba61887c3ed848a749c71ef5d8 to your computer and use it in GitHub Desktop.
Save al3rez/26befbba61887c3ed848a749c71ef5d8 to your computer and use it in GitHub Desktop.
#include <stdio.h>
main()
{
int c;
int len;
len = 0;
while ((c = getchar()) != EOF)
{
if (c != ' ' && c != '\n')
len++;
else
{
printf("%d\n", len);
len = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment