+ 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.
3 Answers
+ 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đ€
+ 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
+ 1
Thank you very much, I understandđđđ