The code won't work. The counting results of b(blank) and t(tab) are both 0. I think there maybe the issue with my condition set up. Can anyone help?
main()
{
int c, b, t, nl;
nl = 0;
b = 0;
t = 0;
while ((c = getchar()) != EOF)
if (c == '\n')
++nl;
if (c == ' ')
++b;
if (c == ' ')
++t;
printf("%d\t%d\t%d\n", nl, b, t);
}