0
Why in sololearn code doesn't work correctly?
I wrote a program on a computer. It works perfectly, but sololearn reads it not correct! Why? https://code.sololearn.com/cZdr2bZkfDnW/?ref=app https://code.sololearn.com/cZdr2bZkfDnW/?ref=app
11 Respuestas
+ 2
How did you provide input Majid?
Q: "Ok!! Suppose the code is not true!
Then why does this code work not correct?"
A: That code works correctly, what is not correct? can you describe the problem?
Running codes that require interactive input in SoloLearn is tricky. See this code to understand how input works in SoloLearn:
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
+ 3
What did you expect that you decided to use `x == x` as loop condition?
+ 1
Sololearn supports one and only one input. You cannot use while with input here
+ 1
Edit:
[if you asking about SL behaviour with input taking, then just need to give all the inputs at one time only..
Because, I think input take input and send to server..]
If your taking about warnjngs:
It is compiler dependent., may be.
Different compiler behave differently..
If you taking about x==x, then it just warning for you unintentionally typed.. Because it is while loop...
If you want remove that, instead of x==x, write while(true) ; it will not give any warnings.. Compiler assumes your intention is clear...
+ 1
It's code bad too?
https://code.sololearn.com/cGMIX4xHB0on/?ref=app
+ 1
Not bad, just a little bit confusing, and it doesn't play nicely in SoloLearn Code Playground because it requires interactive input
+ 1
Thanks!))
0
Ipang, it's clear! But why does she work on a computer perfect?
That I didn't understand!
0
On the computer the cycle restarts if you enter the wrong password.
And the mistaked don't give out!
0
Ok!! Suppose the code is not true!
Then why does this code work not correct?
https://code.sololearn.com/cESZA4puacFM/?ref=app
0
Ok! I realized!