Name: Anonymous 2010-12-10 20:33
what am i doing wrong here
yes, i know, im nothing, im worthless ;_;
#include <stdio.h>
/* count digits, white space, others */
main()
{
int c;
int leaf,rock;
leaf == rock == 0;
while ((c = getchar()) != EOF)
if (c == 'l')
++leaf;
else if (c == 'r')
++rock;
else
printf("leaf:%d\trock:%d\n", leaf, rock);
}yes, i know, im nothing, im worthless ;_;