Bill Cunningham wrote:
>
> I copied this code from page 9 k&r 2 and it gives an error that
> even I can see. Celsius is uninialized.
>
> /* code */
>
> #include <stdio.h>
>
> main(){
> int fahr,celsius,lower,upper,step;
> lower=0;
> upper=300;
> step=20;
> fahr=lower;
> while (fahr<=upper)
> {celsius=5*(fahr-32)/9;
> printf("%d\t%d\n",fahr,celsuis;
> fahr=farh+step;}}
>
> /*end*/
>
> Celsius is intialized within the body of the while function. Why
> is this code from k&r2 not working?
Because that is not the code from K&R.
--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from
http://www.teranews.com