Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
trail multiplication
#tclsh 8.6 gets stdin value1 gets stdin value2 proc dec2bin int { set binRep [binary format c $int] binary scan $binRep B* binStr return $binStr } set a [ dec2bin $value1 ] puts $a set b [ dec2bin $value2 ] puts $b proc mul { c d } { set sum 0 while {$d!=0} { set sum [expr 0b$sum + 0b$c] set d [expr 0b$d - 0b1] } return $sum } puts [mul $a $b]
run
|
edit
|
history
|
help
0
NISP - Planning ID Unit Test
tcl to python list test
Trying bin mul floating point
NISP - Planning ID Unit Test
dssd
Convert a collection to a list
Perfect decimal to binary add
Perfect binary mul and even odd assign 2
Longest common subsequence
zz