0
Abnormal behaviour
Please look at the code where it prints "is not a prime number" (you must input non-prime number), it should print "Hello world" but does not. WHY? https://code.sololearn.com/cDjDHpzN7PjP/?ref=app
4 ответов
+ 1
i just put a
<<endl
before the semicolon of the statment and it got printed ...
i don't even know cpp that much ... 😅
hope that helps, happy coding!!
0
For some reason, the cout stream doesn't seem to be flushed, so you can either use << endl (as Anton Böhler pointed out) or << flush. Btw, the code says that 11 is not a prime number
0
Sorry for the expression, but it is retarded. The compiler should be consistent and I believe that it should work without endl anyway. Thanks guys.
0
Either way, what's wrong with that while loop (h<=n)