Why doesn't it print the result? I've already tapped Ctrl+Z after the input.
code:
#include <stdio.h>
/*histogram of frequences of chars*/
main()
{
int charIn, numa, numb;
numa = numb = 0 ;
while ((charIn == getchar()) != EOF)
{
if (charIn =='a')
++numa;
if (charIn =='b')
++numb;
}
printf("A:%d\n",numa);
printf("B:%d\n",numb);
}