How to print two user input in a single line?

I want to print the "Is your name, Aung Thu?" How can i do this in rust?

You need to trim the input received from the .read_line(...) function by using .trim(). This removes the new-line character, \n.

1 Like

can you show me the example of code?

If you want someone to fix your code, you should at least post it as code instead of an image. Please see Forum Code Formatting and Syntax Highlighting.



1 Like

thank bro. i got it.

thank you for your advice bro.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.