How to put spaces in console output

Terry

New member
Joined
Mar 13, 2022
Messages
1
Programming Experience
Beginner
C#:
Console.WriteLine("your answer is" + num10 * num20);
This prints 'your answer is20'
And i want it to say 'your answer is 20'
Thanks! :)
 
Last edited by a moderator:
Firstly, please provide meaningful titles for your threads. What level you are as a programmer and how difficult you think your question is is of no relevance to the question. The title should be a summary of your problem. In your case, something like "Include space in Console output" would be appropriate.

As for the question, you already know how to include spaces in Console output because you're already doing it. You already have two spaces in your output so why would you think that including a third would be done any differently?
 
Updated the topic title...
 
Back
Top Bottom