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

24th Jan 2022, 5:23 PM
FlooWAP
2 Respostas
0
You forgot to attach your code bit link ☝ https://www.sololearn.com/post/75089/?ref=app
24th Jan 2022, 5:30 PM
Ipang
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 << ','
24th Jan 2022, 5:52 PM
Katherine P