Deprecated: Assigning the return value of new by reference is deprecated in /www/wwwroot/shabab.ps/public_html/vb/showpost.php on line 218

Deprecated: Assigning the return value of new by reference is deprecated in /www/wwwroot/shabab.ps/public_html/vb/showpost.php on line 223
منتديات شباب فلسطين - عرض مشاركة واحدة - لسكريبت بدي حدا يصححلي هالسكريبت ادا صح ....ادا ممكن
عرض مشاركة واحدة
قديم 05-25-2008, 12:19 AM   #4
محمود
..{ مديــــــر عــــام }..
 
الصورة الرمزية محمود
عيد فطر سعيد ,,

قوة السمعة: 50 محمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond reputeمحمود has a reputation beyond repute

افتراضي رد: لسكريبت بدي حدا يصححلي هالسكريبت ادا صح ....ادا ممكن

كود PHP:
#!/bin/bash

factorial ()            # one-parameter function
{
 if (( $
<= ))
 
then
   
echo 1
 
else
   
typeset tmp
   typeset result
   
(( tmp = $))
   (( 
result = `factorial $tmp` * $1))
   echo 
$result
 fi
}

#

echo   "entrer le num"
read   $f

factorial $f
echo '$? is' $?
echo 
factorial $f = `factorial $f`
echo 
'$? is ' $? 
--------

هذه بنظام الريكيرجن ،،
  اقتباس المشاركة