+ 1

hello guys beginner in c language, is it possible to get the user output, if yes how?

another c problem : <

23rd May 2018, 1:47 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
16 odpowiedzi
+ 4
MIkko Celestra Mercado yes you can used scanf() to get input from user like this.. this is a program to calculated a leap year https://code.sololearn.com/cHOQ85w4GrPi/?ref=app
23rd May 2018, 1:50 PM
Arun Tomar
Arun Tomar - avatar
+ 4
MIkko Celestra Mercado dont say sorry every time you asked something.. we all happy to see that you try your best to learn
23rd May 2018, 1:54 PM
Arun Tomar
Arun Tomar - avatar
+ 4
well say Fata1 Err0r
23rd May 2018, 1:58 PM
Arun Tomar
Arun Tomar - avatar
+ 3
I not really understand your questions.. can you be more specific.
23rd May 2018, 1:48 PM
Arun Tomar
Arun Tomar - avatar
+ 3
https://www.tutorialspoint.com/c_standard_library/c_function_scanf.htm ^Go there and scroll down to where it says "EXAMPLE." It shows you how to store the input and how to send the input to the user as output. scanf("%s", str1); ^That's taking in input and storing it into the variable 'str1' printf("Entered Name: %s\n", str1); ^That's taking our input that we stored in 'str1' and sending it to the user as output to their screen.
23rd May 2018, 2:19 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
I think you meant 'user input' instead. https://www.tutorialspoint.com/c_standard_library/c_function_scanf.htm ^You can use the scanf() function for such purposes. I'd recommend that you read all the way through the language first, even if you don't understand it fully yet. Then practice what you could remember and read through all of it again; this time write down notes of anything you still don't understand. Extensively research everything that's written down on your notes and then practice them to further solidify your learning. Repeat that process until you're no longer having to write anything down on your notes. For myself, this has been the best method for learning all of the languages that I know.
23rd May 2018, 1:53 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
oh okay thanks again
23rd May 2018, 1:54 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 2
Oh okay sir😁
23rd May 2018, 1:55 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 2
thanks for helping me i really appreciated it
23rd May 2018, 1:56 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 2
You're welcome. As Arun said, you've no need to apologize, especially over being new to something. Trust me, ALL of us here were new to this at one point or another, and just as lost/confused in the process of learning it all. That's nothing to apologize about. The fact that you're trying to learn programming to begin with is very commendable. Programming isn't for everyone and most give up before they even finish learning their first language.
23rd May 2018, 1:57 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
thank you, thank you so much sir 🙏
23rd May 2018, 1:58 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 2
thanks a lot
23rd May 2018, 2:20 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 1
" Is it possible to get the user input using c language"?
23rd May 2018, 1:50 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
+ 1
oh can you write a code using scanf() please, sorry i am beginner in c
23rd May 2018, 1:53 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
0
but here is my question again, how do i store the user's input and use it on printf
23rd May 2018, 2:02 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar
0
how do i set it
23rd May 2018, 2:02 PM
MIkko Celestra Mercado
MIkko Celestra Mercado - avatar