Deloitte interview question

Write a program to print Square pattern