MTK Android Based Phone IMEI Write Tool, DirecTV Now Launch Will Include Zero Rated Bandwidth on the Mobile Network, video entertainment product with a heavy mobile, Smartphone Apps Drive Content Usage, It will not surprise you that smartphones now are the ways most people interact with the Internet, Social Networking Web Server via Arbitrary Code Execution, Released Add New Method FOR Reset FRP Samsung

Sunday, December 16, 2012

All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial

All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial - do you know that every day there are new gadgets that are created with new advantages to simplify your life, on the blog Gadget Center we will discuss about the latest gadgets and gadgets that have long ranging from speck and price, now we will discuss about All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial we have collected a lot of news to make this article to be really useful for you, please see.

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

You can also see our article on:


All New 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://mjoaobrum.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"



article titled All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial has been completed in the discussion

hopefully information about All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial can provide benefits for you in determining the gadget to suit your needs so much easier in living everyday life.

you just read the article entitled All New Tcl and OTcl Tutorial for NS2 - Program to find Factorial if you feel this information is useful for you and want to bookmark it or want to share it please use link https://mjoaobrum.blogspot.com/2012/12/all-new-tcl-and-otcl-tutorial-for-ns2.html.

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

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

0 comments:

Post a Comment