Home  >  Q&A  >  body text

c++ - VS2015没有cout还能输出是怎么回事

PHP中文网PHP中文网2715 days ago594

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 13:40:49

    The following if (a[p] = -1) will execute this assignment statement. The code idea is really strange and the idea is a bit confusing
    The middle a[1] = 2, a[2] = 3 , a[4] = 5, a[6] = 7, a[10] = 11, a[12] = 13; Don’t you find this paragraph uncomfortable...
    int mainvoid main This is a conclusion It's a problem, void is wrong, LLVM will even report this error, there is no need to use the void main method
    The idea is a bit confusing, it is recommended to rewrite it

    To add, the continue statement should be used as little or as little as possible, as it can easily lead to code that is difficult to understand

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:40:49

    There are many problems in the code provided by the questioner, and modification is more troublesome than rewriting. It is recommended to refer to the Sieve of Eratosthenes algorithm to rewrite one (the animation in the link is very easy to understand).

    reply
    0
  • PHPz

    PHPz2017-04-17 13:40:49

    The idea of ​​​​this code is simply unconstrained. If you can't even tell that the subscript is out of bounds and if (a[p] = -1), you might as well leave the school girl to me. It is recommended to rewrite it directly without changing it.

    reply
    0
  • Cancelreply