منذ /02-04-2010, 11:08 PM
|
#10
|
ملكة التنسيق![](http://www.banaat.com/image/Ms.KuwaiT/pix663.gif)
مَ عدتْ أقوى فرآق ='(
|
Answer questions no 3 and 4 in 2 different methods using for statement and While statement.
هذآ آلسسؤآل آلـآول :
Write and run a program that calculates a sum of odd numbers (in the range between 0 and 100)
وهذآ آلسسؤآل آلثآني:
Write a program that calculates the factorial of a number as follows: The factorial of n!= n*(n-1)*(n-2),,,*2*1
Example: 4!=4*3*2*1=24
Note that n has to be positive
ويبغى ششآشة الـrun كذآ طبعاً حقت آلسسؤآل آلثآني:
|
![](banaatcom1/images/Quote_02.gif) |
This program calculates the factorial of a number.
Please enter a number: 5
The factorial of 5 =120
|
|
بس هذآ آلمطلووب
أنآ ألحين حليت آلسؤآل آلثآني برسسله لك بس بآلرد إللي بعده عشآن مآتنحآس آلدنيآ
![](http://dc03.arabsh.com/i/01980/2s3mvgdz0493.jpg)
*دخولْ مُتقطع ><
* طَـالبه في مدرسسه إبداع *
|
|
|
|