为了账号安全,请及时绑定邮箱和手机立即绑定

各路大神,我的代码是不是有错误?

各路大神,我的代码是不是有错误?

C
走心539 2017-12-17 23:53:39
#include <stdio.h> main() {   int I;   while(I’m alive) {      I+=learn C;      do      {           I*=learn C;           for(I=half live;I>alive;learn++)           {               l*=learn hard;               printf(“从入门到放弃\ngame over!”);            }       }while(I died); } return 0; } 我的代码是不是有错误😂
查看完整描述

3 回答

?
NullMoneyException

TA贡献9条经验 获得超16个赞

while(alive){

eat();

playGame();

eat()

playGame();

sleep();

}

查看完整回答
2 反对 回复 2017-12-18
?
AdamHeaven

TA贡献1条经验 获得超2个赞

while条件写错,应该是;

while(I'm not died);



查看完整回答
2 反对 回复 2017-12-18
?
慕用4063026

TA贡献195条经验 获得超115个赞

哈哈,这是我复制你的代码运行后的报错

Compilation Failed



/usercode/file.cpp:2:1: error: stray ‘\357’ in program

 main()

 ^

/usercode/file.cpp:2:1: error: stray ‘\274’ in program

/usercode/file.cpp:2:1: error: stray ‘\210’ in program

/usercode/file.cpp:2:1: error: stray ‘\357’ in program

/usercode/file.cpp:2:1: error: stray ‘\274’ in program

/usercode/file.cpp:2:1: error: stray ‘\211’ in program

/usercode/file.cpp:3:1: error: stray ‘\357’ in program

 {

 ^

/usercode/file.cpp:3:1: error: stray ‘\275’ in program

/usercode/file.cpp:3:1: error: stray ‘\233’ in program

/usercode/file.cpp:5:3: error: stray ‘\357’ in program

   while(I’m alive)

   ^

/usercode/file.cpp:5:3: error: stray ‘\274’ in program

/usercode/file.cpp:5:3: error: stray ‘\210’ in program

/usercode/file.cpp:5:3: error: stray ‘\342’ in program

/usercode/file.cpp:5:3: error: stray ‘\200’ in program

/usercode/file.cpp:5:3: error: stray ‘\231’ in program

/usercode/file.cpp:5:3: error: stray ‘\357’ in program

/usercode/file.cpp:5:3: error: stray ‘\274’ in program

/usercode/file.cpp:5:3: error: stray ‘\211’ in program

/usercode/file.cpp:6:1: error: stray ‘\357’ in program

 {

 ^

/usercode/file.cpp:6:1: error: stray ‘\275’ in program

/usercode/file.cpp:6:1: error: stray ‘\233’ in program

/usercode/file.cpp:9:6: error: stray ‘\357’ in program

      {

      ^

/usercode/file.cpp:9:6: error: stray ‘\275’ in program

/usercode/file.cpp:9:6: error: stray ‘\233’ in program

/usercode/file.cpp:11:11: error: stray ‘\357’ in program

           for(I=half live;I>alive;learn++)

           ^

/usercode/file.cpp:11:11: error: stray ‘\274’ in program

/usercode/file.cpp:11:11: error: stray ‘\210’ in program

/usercode/file.cpp:11:11: error: stray ‘\357’ in program

/usercode/file.cpp:11:11: error: stray ‘\274’ in program

/usercode/file.cpp:11:11: error: stray ‘\211’ in program

/usercode/file.cpp:12:11: error: stray ‘\357’ in program

           {

           ^

/usercode/file.cpp:12:11: error: stray ‘\275’ in program

/usercode/file.cpp:12:11: error: stray ‘\233’ in program

/usercode/file.cpp:14:15: error: stray ‘\357’ in program

               printf(“从入门到放弃\ngame over!”);

               ^

/usercode/file.cpp:14:15: error: stray ‘\274’ in program

/usercode/file.cpp:14:15: error: stray ‘\210’ in program

/usercode/file.cpp:14:15: error: stray ‘\342’ in program

/usercode/file.cpp:14:15: error: stray ‘\200’ in program

/usercode/file.cpp:14:15: error: stray ‘\234’ in program

/usercode/file.cpp:14:15: error: stray ‘\344’ in program

/usercode/file.cpp:14:15: error: stray ‘\273’ in program

/usercode/file.cpp:14:15: error: stray ‘\216’ in program

/usercode/file.cpp:14:15: error: stray ‘\345’ in program

/usercode/file.cpp:14:15: error: stray ‘\205’ in program

/usercode/file.cpp:14:15: error: stray ‘\245’ in program

/usercode/file.cpp:14:15: error: stray ‘\351’ in program

/usercode/file.cpp:14:15: error: stray ‘\227’ in program

/usercode/file.cpp:14:15: error: stray ‘\250’ in program

/usercode/file.cpp:14:15: error: stray ‘\345’ in program

/usercode/file.cpp:14:15: error: stray ‘\210’ in program

/usercode/file.cpp:14:15: error: stray ‘\260’ in program

/usercode/file.cpp:14:15: error: stray ‘\346’ in program

/usercode/file.cpp:14:15: error: stray ‘\224’ in program

/usercode/file.cpp:14:15: error: stray ‘\276’ in program

/usercode/file.cpp:14:15: error: stray ‘\345’ in program

/usercode/file.cpp:14:15: error: stray ‘\274’ in program

/usercode/file.cpp:14:15: error: stray ‘\203’ in program

/usercode/file.cpp:14:15: error: stray ‘\’ in program

/usercode/file.cpp:14:15: error: stray ‘\357’ in program

/usercode/file.cpp:14:15: error: stray ‘\274’ in program

/usercode/file.cpp:14:15: error: stray ‘\201’ in program

/usercode/file.cpp:14:15: error: stray ‘\342’ in program

/usercode/file.cpp:14:15: error: stray ‘\200’ in program

/usercode/file.cpp:14:15: error: stray ‘\235’ in program

/usercode/file.cpp:14:15: error: stray ‘\357’ in program

/usercode/file.cpp:14:15: error: stray ‘\274’ in program

/usercode/file.cpp:14:15: error: stray ‘\211’ in program

/usercode/file.cpp:15:12: error: stray ‘\357’ in program

            }

            ^

/usercode/file.cpp:15:12: error: stray ‘\275’ in program

/usercode/file.cpp:15:12: error: stray ‘\235’ in program

/usercode/file.cpp:16:7: error: stray ‘\357’ in program

       }while(I died);

       ^

/usercode/file.cpp:16:7: error: stray ‘\275’ in program

/usercode/file.cpp:16:7: error: stray ‘\235’ in program

/usercode/file.cpp:16:7: error: stray ‘\357’ in program

/usercode/file.cpp:16:7: error: stray ‘\274’ in program

/usercode/file.cpp:16:7: error: stray ‘\210’ in program

/usercode/file.cpp:16:7: error: stray ‘\357’ in program

/usercode/file.cpp:16:7: error: stray ‘\274’ in program

/usercode/file.cpp:16:7: error: stray ‘\211’ in program

/usercode/file.cpp:17:1: error: stray ‘\357’ in program

 }

 ^

/usercode/file.cpp:17:1: error: stray ‘\275’ in program

/usercode/file.cpp:17:1: error: stray ‘\235’ in program

/usercode/file.cpp:19:1: error: stray ‘\357’ in program

 }

 ^

/usercode/file.cpp:19:1: error: stray ‘\275’ in program

/usercode/file.cpp:19:1: error: stray ‘\235’ in program

/usercode/file.cpp:2:1: error: ‘main’ does not name a type

 main()

 ^

/usercode/file.cpp:5:3: error: expected unqualified-id before ‘while’

   while(I’m alive)

   ^

/usercode/file.cpp:8:6: error: expected unqualified-id before ‘do’

      do

      ^

/usercode/file.cpp:11:11: error: expected unqualified-id before ‘for’

           for(I=half live;I>alive;learn++)

           ^

/usercode/file.cpp:11:29: error: ‘I’ does not name a type

           for(I=half live;I>alive;learn++)

                             ^

/usercode/file.cpp:11:37: error: ‘learn’ does not name a type

           for(I=half live;I>alive;learn++)

                                     ^

/usercode/file.cpp:14:15: error: ‘printf’ does not name a type

               printf(“从入门到放弃\ngame over!”);

               ^

/usercode/file.cpp:16:10: error: expected unqualified-id before ‘while’

       }while(I died);

          ^

/usercode/file.cpp:18:1: error: expected unqualified-id before ‘return’

 return 0;

 ^


查看完整回答
反对 回复 2017-12-18
?
qq_任小嗨_0

TA贡献3条经验 获得超0个赞

在哪抄的,条件不对,

查看完整回答
反对 回复 2017-12-18
  • 3 回答
  • 0 关注
  • 3665 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信