0
Movie Tickets C++ sorted output
So I solved the case for the Movie Ticket problem and solo learn says, that it is ok this way. In the output, every 1 gets its single line. Is there a way, to sort the rows and columns in the output like this: 1,1,1,1,1,1 1,1,1,1,1,1 1,1,1,1,1,1 1,1,1,1,1,1 1,1,1,1,1,1 1,1,1,1,1,1 ? Thank you
2 Answers
0
You forgot to attach your code bit link â
https://www.sololearn.com/post/75089/?ref=app
0
Yes, something like this should work:
int counter=0;
/* add code to increment counter each time you print a '1' */
if(counter % 6 ==0) /* counter is divisible by 6 */
cout << '\n';
else
cout << ','