Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Arithmetic-Integer/Tcl/arithmetic-integer-1.tcl
Normal file
11
Task/Arithmetic-Integer/Tcl/arithmetic-integer-1.tcl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
puts "Please enter two numbers:"
|
||||
|
||||
set x [expr {int([gets stdin])}]; # Force integer interpretation
|
||||
set y [expr {int([gets stdin])}]; # Force integer interpretation
|
||||
|
||||
puts "$x + $y = [expr {$x + $y}]"
|
||||
puts "$x - $y = [expr {$x - $y}]"
|
||||
puts "$x * $y = [expr {$x * $y}]"
|
||||
puts "$x / $y = [expr {$x / $y}]"
|
||||
puts "$x mod $y = [expr {$x % $y}]"
|
||||
puts "$x 'to the' $y = [expr {$x ** $y}]"
|
||||
1
Task/Arithmetic-Integer/Tcl/arithmetic-integer-2.tcl
Normal file
1
Task/Arithmetic-Integer/Tcl/arithmetic-integer-2.tcl
Normal file
|
|
@ -0,0 +1 @@
|
|||
incr x $y
|
||||
Loading…
Add table
Add a link
Reference in a new issue