+ 1

Run my C code with sololearn

Good afternoon everyone! Please I want your help ! I want to run my C code with sololearn and I can’t ! Went I run it I receive a message where there said that. Look like your program need input https://code.sololearn.com/csaAeuxB9YJi/? ref=app Here is my code ! Please I need help 🙏🏾 Have a nice day!

28th Feb 2022, 1:53 PM
Jugnia Tchaptcheu Serena
Jugnia Tchaptcheu Serena - avatar
9 Respuestas
+ 2
Jungnia Tchaptcheu Like Simba and Simon Sauter are stating if you have input needs for your program SoloLearn Playgroud needs all of those before it runs your program. #include <stdio.h> int main(void){ char name[25]; puts("Please enter your first name:"); scanf("%s", name); //not safe but works printf("Hello %s, hope you enjoy your time here on SoloLearn.\n", name); } Click run on playground >> enter 24 or less charaters (for this example) in the text box >> click submit. For example name == "William" Output Please enter your first name: Hello William, hope you enjoy your time here on SoloLearn.
28th Feb 2022, 2:41 PM
William Owens
William Owens - avatar
+ 4
That pop up window isn't an error message. You should enter the input in the pop up window as its message mentions. See here https://www.sololearn.com/post/664632/?ref=app
28th Feb 2022, 2:33 PM
Simba
Simba - avatar
+ 1
Read the error messages. They tell you what to do.
28th Feb 2022, 1:59 PM
Simon Sauter
Simon Sauter - avatar
+ 1
They please how can I do what they ask my to do ?
28th Feb 2022, 2:04 PM
Jugnia Tchaptcheu Serena
Jugnia Tchaptcheu Serena - avatar
+ 1
Please williame owens if I have move than 1 or maybe 4 input in my code should I enter all of these in that text box at the same time ?
1st Mar 2022, 2:16 AM
Jugnia Tchaptcheu Serena
Jugnia Tchaptcheu Serena - avatar
+ 1
Yes all inputs have to be entered at the start Input 1 Input. 2 Etc Submit
1st Mar 2022, 11:15 AM
William Owens
William Owens - avatar
+ 1
Be careful of the scanf("%c"); scanf("%c"); There is a keyboard buffer that retains the \n char you have to account for.
1st Mar 2022, 12:10 PM
William Owens
William Owens - avatar
0
Thank you Sir 🙏🏾
1st Mar 2022, 11:24 AM
Jugnia Tchaptcheu Serena
Jugnia Tchaptcheu Serena - avatar
0
Okay sir
1st Mar 2022, 2:08 PM
Jugnia Tchaptcheu Serena
Jugnia Tchaptcheu Serena - avatar