Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?
User enters 2331 the odd numbers are 3 ,3 and 1 the sum of them is 10 so it should print in screen this shape:
*
***
*****
*******
*********
***********
*************
***************
*****************
*******************
*******
*******
*******
If he enters 1316 the sum of odd number is 5 the shape should be like this:
*
***
*****
*******
*********
***
***
***