Aptean Interview Question

2 Programs, 1 on string and 1 on pattern printing