Hi Abhishek Kumar,
Thank you for reaching out to Microsoft Q & A forum.
The issue arises because Console.WriteLine() automatically appends a new line after printing each statement, which causes the output to appear on separate lines. To ensure everything is printed on the same line, you can use Console.Write() instead, as it does not add a new line after the output. Alternatively, you can combine the text into a single Console.WriteLine() statement, such as Console.WriteLine("the world dies .");, to produce the desired result. Use the appropriate method depending on whether you want the output to continue on the same line or start a new one.
Screenshot for your reference:
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.
Thank you.