for printing a line vertically, you have to understand how print statements or function works.Every time they print something, they take the cursor to the end where they have stopped printing. After printing a single character from the line, you'll have to move the cursor to the next line.
I'm assuming you have a string and you want to print that string vertically.
You can iterate through the individual characters of the string and can print them.
If I give you an example using python, it will be something like this:
string = "Hii, I'm xyz and I love coding,"
for character in string:
print(character, end = '')
You can implement this in any language by using this as blueprint
Note: print function in python by default end with a new line . I've just kept it so you can understand that for languages such as java, c, c++, c# we will have to insert new line character.