Miss Bourjois
مجموعة حواء
- إنضم
- 24 مايو 2010
- المشاركات
- 2,472
- مستوى التفاعل
- 88
- النقاط
- 48
السلاااااااااااااام ..
كيفكم .؟
بليييييييييز سسآعدوني } في حل هـ المسسسأله
أبيهـآ بكرآ .. ضرووري ،‘
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?
For example:
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:
*
***
*****
*******
*********
***
***
***
كيفكم .؟
بليييييييييز سسآعدوني } في حل هـ المسسسأله
أبيهـآ بكرآ .. ضرووري ،‘
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?
For example:
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:
*
***
*****
*******
*********
***
***
***