Last active
November 26, 2018 09:24
-
-
Save arif98741/0a8d8306bbc6032027a4659137f16127 to your computer and use it in GitHub Desktop.
White Space Count C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main () | |
{ | |
int d=0; | |
int e; | |
while ((e=getchar())!=EOF) | |
{ | |
if(e==' ') | |
{ | |
d++; | |
} | |
if(e=='\n'){ | |
break; | |
} | |
} | |
printf("%d",d); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment