program does not working in C

hpy_azizy <hpy_azizy@yahoo.com> — 2003-01-07 10:30:00

#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);
}

hpy_azizy <hpy_azizy@yahoo.com> — 2003-01-07 22:08:51

#include <stdio.h>
float convert(float celn);
main ()
{
float fhr,cel,lowr_cel,uper_cel,step_cel=0;
uper_cel=148.9;
printf ("Fahrenheit\tCelsium\n");
for (lowr_cel=-17.8;cel <= uper_cel;cel=cel+11.1)
printf (" %3.0f\t\t%6.1f\n",fhr,convert(cel));
return 0;
}
float convert(float celn);
{
float fhr,cel,lowr_cel,uper_cel,step_cel=0,cel;
for (lowr_cel=-17.8;cel <= uper_cel;cel=cel+11.1)
fhr=32+(cel/(5.0/9.0));
return fhr;
}