Write a program to "fold" long input lines into two or more shorter lines after the last non-blank character that occurs before the n -th column of input. Make sure your program does something intelligent with very long lines, and if there are no blanks or tabs before the specified column.

If i for example enter a tab, Do i have to count it as a number of x blank characters, depending on the tab stop? How exactly should i handle tabs?