K&安培; R2 [英] k&r2

查看:86
本文介绍了K&安培; R2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从第9页k& r 2复制了这段代码,它给出了一个错误,即使我可以看到
。 Celsius未被发现。


/ * code * /


#include< stdio.h>


main(){

int fahr,摄氏,下,上,步;

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 +步骤;}}


/ *结束* /


摄氏度在while函数体内初始化。为什么这个
k& r2的
代码不起作用?


比尔

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?

Bill

推荐答案

在文章< ; b9l2j.29168
In article <b9l2j.29168


Xg.23657@trnddc06>,

Bill Cunningham< so ** @ net.comwrote:
Xg.23657@trnddc06>,
Bill Cunningham <so**@net.comwrote:

我从第9页k& r 2复制了这段代码,它给出了一个错误,甚至我都可以看到。摄氏度是未经初始化的。
I copied this code from page 9 k&r 2 and it gives an error that even I
can see. Celsius is uninialized.


> / * code * /
>/* code */


> #include< stdio.h>

main (){

int fahr,摄氏,下,上,步;

lower = 0;

upper = 300;

step = 20;

fahr = lower;

while(fahr< = upper)

{celsius = 5 *(fahr -32)/ 9;

printf("%d \ t%d \ n",fahr,celsuis;
>#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;



您是否注意到上面一行的摄氏度拼写错误?

Did you notice the misspelling of celsius on the above line?


fahr = farh + step; } *
/ *结束* /
fahr=farh+step;}}

/*end*/



-

没有人有权销毁另一个人的信念是:b $ b要求经验证据。 - Ann Landers

--
"No one has the right to destroy another person''s belief by
demanding empirical evidence." -- Ann Landers


Bill Cunningham写道:
Bill Cunningham wrote:

我从第9页复制了这段代码k& r 2并且它给出了一个错误,即使我可以看到
。 Celsius未被发现。


/ * code * /


#include< stdio.h>


main(){

int fahr,摄氏,下,上,步;

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 +步骤;}}


/ *结束* /


摄氏度在while函数体内初始化。为什么这个
来自k& r2的
代码不起作用?
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?



你应该再看一遍这个消息。难道不是celsuis是

undefined" ;? celsuis?


你有没有得到关于farh的内容?

You should read the message again. Isn''t it rather "celsuis is
undefined"? celsuis?

And did you get something about "farh"?


这篇关于K&安培; R2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆