how can i print this shape in c :
x=2;
+---+
:XX :
:X 0:
: 00:
+---+
x=3;
+----+
:XXX :
:XX 0:
:X 00:
: 000:
+----+
using loops and function only.
please help , cant figure it out for days .