7 Jan 2003 11:30
[stack] program does not working in C
hpy_azizy <hpy_azizy <at> yahoo.com> <hpy_azizy <at> yahoo.com>
2003-01-07 10:30:00 GMT
2003-01-07 10:30:00 GMT
#include <stdio.h>
I wrote as it is but No use . Any suggestions
main ()
{
int c,i,nwhite,nother;
int ndigit[10];
nwhite = nother = 0;
for (i = 0 ; i < 10 ; ++i)
ndigit[i] = 0;
while ((c=getchar()) != EOF )
if (c >= '0' && c <= '9')
++ndigit[c-'0'];
else if (c == ' ' || c == '\n' || c == '\t')
++nwhite;
else
++nother;
printf("digits=");
printf("%d",ndigit[i]);
printf(",white space = %d. other = %d\n",nwhite,nother);
}
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Flexible Keyboard is the ideal accessory for PDA users that are on the move.
http://us.click.yahoo.com/dCBVZC/WnCFAA/xGHJAA/saFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
concatenative-unsubscribe <at> egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
(Continue reading)
RSS Feed