Arrays wave print

i getting output row wise can you tell me what changes i should make to print column wise

@Aditiverma
I request you to refer to this video. This video is a part of your course named “CPP Webinar : 2-D Arrays, Strings” under the section “Arrays 2.0 (2D Arrays,Strings)”.
This is a Webinar Video.
I would suggest you to watch the entire webinar but if you simply want the Wave Print part ,
jump to 1 hr 20 min mark where Prateek Bhaiya discussed the approach and code for the wave print.