Aspire Systems Interview Question

Pattern programming, print the given string in different patterns