c语言可以查出拼写错误码,代码报错,实在看不出问题在哪里,求帮忙看下

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

float sn=100.0,hn=50.0;

for(int n=2;n<=10;n++)

{

sn=sn+2*hn;/*第n次落地时共经过的米数*/

hn=hn/2; /*第n次反跳高度*/

}

printf("第10次落地时,共经过%f米 \n",sn);

printf("第10次反弹%f米\n",hn);

-----错误提示如下-----

Compiling...

text_one.cpp

G:\text_one.cpp(9) : error C2018: unknown character '0xa1'

G:\text_one.cpp(9) : error C2018: unknown character '0xa1'

G:\text_one.cpp(10) : error C2018: unknown character '0xa1'

G:\text_one.cpp(10) : error C2018: unknown character '0xa1'

G:\text_one.cpp(10) : error C2018: unknown character '0xa1'

G:\text_one.cpp(10) : error C2018: unknown character '0xa1'

G:\text_one.cpp(11) : error C2018: unknown character '0xa1'

G:\text_one.cpp(11) : error C2018: unknown character '0xa1'

G:\text_one.cpp(11) : error C2018: unknown character '0xa1'

G:\text_one.cpp(11) : error C2018: unknown character '0xa1'

G:\text_one.cpp(12) : error C2018: unknown character '0xa1'

G:\text_one.cpp(12) : error C2018: unknown character '0xa1'

G:\text_one.cpp(15) : warning C4508: 'main' : function should return a value; 'void' return type assumed

G:\text_one.cpp(41) : warning C4244: '=' : conversion from 'const double' to 'int', possible loss of data

G:\text_one.cpp(41) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(42) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(43) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(44) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(49) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(51) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(53) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(55) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(57) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(59) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data

G:\text_one.cpp(70) : warning C4244: '=' : conversion from 'double' to 'long', possible loss of data

G:\text_one.cpp(71) : warning C4244: '=' : conversion from 'double' to 'long', possible loss of data

G:\text_one.cpp(157) : warning C4305: 'initializing' : truncation from 'const int' to 'char'

G:\text_one.cpp(157) : warning C4309: 'initializing' : truncation of constant value

G:\text_one.cpp(157) : warning C4305: 'initializing' : truncation from 'const int' to 'char'

G:\text_one.cpp(157) : warning C4309: 'initializing' : truncation of constant value

执行 cl.exe 时出错.

text_one.obj - 1 error(s), 0 warning(s)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值