+ 1

Line it up, I donā€™t need it stacked. (Solved)

Iā€™m working on a project in C#, and the input needs to be in a straight line. Yet every time I run it, it comes out as a stack. (Problem is Multiple of 3 in C#) Input: 7 Expected output: 12*45*7 Actual output 7 * 5 4 * 2 1 https://code.sololearn.com/cd5DvrR6x3LH/?ref=app You can look at the code

20th Jun 2022, 4:12 PM
Tristan Smith
Tristan Smith - avatar
2 Answers
+ 2
First of all, you are counting downwards (from 7 to 1) except upwards. To bring the output into the same line, you should use the ā€œConsole.Write()ā€ method (without the ā€œLineā€) Hope that could help you
20th Jun 2022, 4:15 PM
Alexander Thiem
Alexander Thiem - avatar
+ 1
cetozofumee Just use Write method because WriteLine method adds new line.
20th Jun 2022, 4:24 PM
AĶ¢J
AĶ¢J - avatar