The code provided for this concept till the end is producing incorrect output for the following input:-
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
Please check and provide the correct solution.
The code provided for this concept till the end is producing incorrect output for the following input:-
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
Please check and provide the correct solution.
Hi
Can you please share the code and the correct output for the code?
Thanks
This is the output of the code
1 2 3 4 5 ,10 15 20 ,19 18 17 16 ,11 6 ,7 8 9 ,14 ,13 12 , ,
Are you talking about the 2 commas at the end?
The print order is absolutely correct however you need to apply condition when putting comma whether it is blank entry or not.
Or you could remove the commas altogether as it is not required