+ 3

First code + problems

Hi guys ! I just have written my first code and wanted to share with you but: 1. It does work (kind off) on my VisualStudio but does not work on SoloLearn Code playground. Any ideas why ? 2. In VisualStudio it works as intended only if I choose option "B" or when I press different key than "A" or "B" If I press "A" or "Escape" to exit it does go through else statements as well. Any help or info would be appreciated. Thanks ! Code on my profile "Code#001" or link https://code.sololearn.com/c11Mmc2t2VQ8/#cs

10th Nov 2018, 1:07 PM
Kacper
4 odpowiedzi
+ 6
Please put the language you use in the tags. Be aware that on sololearn you need to give all input before the code is processed. Because the code runs on a remote server. So you cannot use the do while loop with ConsoleKey.Escape https://code.sololearn.com/c0binsN68PEL Console.ReadKey changed in Console.Read Console.Clear you cannot use The rest of the code is fine.
10th Nov 2018, 9:56 PM
sneeze
sneeze - avatar
+ 4
Probably Sololearn code playground doesn't support such things. https://www.sololearn.com/post/44879/?ref=app
10th Nov 2018, 1:40 PM
Roneel
Roneel - avatar
+ 3
https://code.sololearn.com/c2fVKTVHJb8D/?ref=app
6th Feb 2021, 1:36 AM
Krishna
+ 2
Thank you for your time and tips Roneel & sneeze :)
11th Nov 2018, 4:33 AM
Kacper