Professional Documents
Culture Documents
CN Exp3 60003230300
CN Exp3 60003230300
Experiment No. 3
1.
set a 24 set b 15 puts $a puts $b
puts " The value of a = $a" puts
"The value of b = $b" puts "The
value of a+b= $a + $b"
2.
set a 24 set
b
15 puts $a puts $b puts " the
value of a= $a" puts " the
value of b= $b" puts " the
value of a+b= $a+$b" set c
[expr $a+$b] puts " the value
of c= $c" set d [expr [expr
$b-$a] * $c]
puts " the value of d= $d"
Sap id: 60003230300
3.
proc display {} { puts "Welcome to STTP Organized by JDIET Yavatmal"
} display
4.
5.
proc print { k } { for {set i 0 } {$i <
Sap id: 60003230300
$k } { incr i} { puts "node_{$i}
\t n$i" puts "n$i $k"
} } print
1
6.
7,8,9.
set ns [new Simulator]
8
Sap id: 60003220127