code to display square values