Innaz Review, Samsung Galaxy, price and specifications, Flash Android, Games For Your Apple, Jailbreak Tool For iOS, IMEI Unlock Method

Minggu, 16 Desember 2012

Tcl and OTcl Tutorial for NS2 - Program to find Factorial

Tcl and OTcl Tutorial for NS2 - Program to find Factorial - In the past, when I started to start blogging, many thoughts disturbed me. I want to have a blog with a nice and interesting look. I am constantly looking for basic tutorials from some web and blogs on the internet. And thankfully, one by one I started to do it, and of course have to go through some confusion process first, but the most important of a blog that is content, yes on the blog Innaz Review we will discuss a lot of information about gadgets that are very in need by you, now we will discuss first about Tcl and OTcl Tutorial for NS2 - Program to find Factorial please refer to the information we will convey until completion:

Articles : Tcl and OTcl Tutorial for NS2 - Program to find Factorial
full Link : Tcl and OTcl Tutorial for NS2 - Program to find Factorial

You can also see our article on:


Tcl and OTcl Tutorial for NS2 - Program to find Factorial



 Fractorial Computation: tcl script to obtain the value of 10! = 10 * 9 * ... * 1.

  1. get  http://innaz2.blogspot.com /" rel="nofollow" target="_blank">factorial.tcl and run the script;
  2. write a function to compute 2^x, test your answer.
Execute the script as:

$ tclsh lab1a.tcl
or
$ ns lab1a.tcl



################################################################################


#filename : factorial.tcl
# define function to compute Factorial X!
proc Factorial {x} {
    # define variable
    set result 1
   
    # for loop
    for {set i 1} {$i <= $x} {incr i} {
set result [expr $result * $i]
    }
   
    # return computation result
    return $result
}


#############################################################################


# define function to compute 2^x
proc 2pow {x} {
    # define variable
    set result 1
   
    # for loop
    for {set i 1} {$i <= $x} {incr i} {
# fill in here
    }
   
    # return computation result
    return $result
}
# make function call
set result [Factorial 10]

# output result
puts "$result"

# make function call
set result [2pow 10]

# output result
puts "$result"



so much information Tcl and OTcl Tutorial for NS2 - Program to find Factorial

hopefully Tcl and OTcl Tutorial for NS2 - Program to find Factorial information can provide benefits for you in determining the gadgets that fit your needs in daily life.

you just read Tcl and OTcl Tutorial for NS2 - Program to find Factorial if you feel this information is useful and want to bookmark or share it please use link https://innaz2.blogspot.com/2012/12/tcl-and-otcl-tutorial-for-ns2-program.html if you want more information please search on other pages this blog.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : Tcl and OTcl Tutorial for NS2 - Program to find Factorial

0 komentar:

Posting Komentar