Ace Micromatic Interview Question

Pattern printing , matrix, palindrome