+ 3
Why isn't this working?
I wrote a program to list out the natural numbers but it isn't working. I tried for hours to get the statement at line 43 to work but to no avail. Could someone please take a look at it and tell me what's amiss? https://code.sololearn.com/cSqWNJ5gLWnD/?ref=app
3 Respostas
+ 2
This isn't a bug or error, but just something you kind of have to deal with when programming on Sololearn. The one thing I don't like about the Sololearn code playground for most languages is that it doesn't offer a live console, meaning you can't repeatedly try to take user input after input has just been given. Because of this, your program will only run what it can and ignore the rest, which is why the second cin function won't run. This should run however on an IDE that does support a live console, as it doesn't seem to have many things wrong with it.
Hope this helped!
+ 1
@Faisal could you please run my program on an IDE that does offer a live console and tell me if it's running correctly? I can't seem to do that.
+ 1
@Prasun Chatterjee I can't seem to get Eclipse to recognize the iostream library for some reason, so it doesn't seem that I can run your program. :/ Sorry about that!