Vertical order print program is not working

hello @jha.aparna17
check now->