anu2468

anu2468

Joined
Jun 05, 2014

Activity Stream

anu2468   -  Jun 05, 2014

Hi Team ,

I am new to TCL scripting . could you please tell me what is the mistake i have done in the below prog. I am trying to write program for base power such as 2 power 2 or 3 power 5 etc.

proc Factorial {x y} {
set i 1;
while {$i <= $x} {
set x [expr $x * $i]
incr i
}
return $x
}
puts " [Factorial 2 2]"

The output shows blank . Please assist me here.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.