help me! I do not know what happened to my code. I want to put information from scanf into printf but the result is not as I e | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

help me! I do not know what happened to my code. I want to put information from scanf into printf but the result is not as I e

https://code.sololearn.com/c7zoXxecgIl7/?ref=app help me! I do not know what happened to my code. I want to put information from scanf into printf but the result is not as I expected. thanks everyone.

8th Nov 2019, 4:29 AM
Phuong Pham
Phuong Pham - avatar
3 Respostas
+ 8
I guess problem is, you're using scanf() statment at last, which isn't valid. You have to take inputs before you print them. So move scanf() statement right before print statement, it worksšŸ¤“
8th Nov 2019, 4:52 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 5
Phuong Pham, you are printing the values before reading them, so it displayes whatever values where stored in that address (known as garbage values) So to correct that just like šŸŽƒ Dark Knight šŸŽƒ said, put scaf first https://code.sololearn.com/coJWqfyET7A2/?ref=app
8th Nov 2019, 5:44 AM
Arsenic
Arsenic - avatar
+ 1
Thank you very much, I understandšŸ˜‰šŸ˜†šŸ˜†
8th Nov 2019, 1:35 PM
Phuong Pham
Phuong Pham - avatar