0
Hello bosses i need some help
I want to write a small program but i got a big problem :) this code run properly on my pc but here it wont work. I tried with fgets but it won't work. i want to compare user input like strcmp(response, "much, more") how can i do that? https://code.sololearn.com/cjk9sOBVwv3m/?ref=app
5 Answers
+ 2
while(1){} does not work in Sololearn.
your code is executed on the server side. you can't hold the server with while(1) forever.
it will work only when input == ok
other inputs will just hold the server waiting for another input, and it's not possible to enter one again after hitting run.
0
Hmm i wonder how can i take a string input with space in it , in this case
0
use fgets instead of scanf
in case you need to enter multiple inputs in sololearn you can write them in multiple lines. ie
input 1
input 2
input n... then submit
0
Hmm thx you are a C dev?
0
not specifically, I use C when I have to.