Appinventiv Interview Question

Write program of pattern and string manipulation.