Skip to content

Commit

Permalink
add complex
Browse files Browse the repository at this point in the history
  • Loading branch information
mjago committed Jan 1, 2017
1 parent 801ee48 commit 59e7e69
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions complex/complex.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require "colorize"
require "complex"
x1 = Complex.new(1, 0)
x2 = Complex.new(2, 1)
pp x1
pp x2
puts
p "x 1 + x2 = #{x1 + x2}"
p "x1 - x2 = #{x1 - x2}"
p "x1 * x2 = #{x1 * x2}"
p "x1 / x2 = #{x1 / x2}"

0 comments on commit 59e7e69

Please sign in to comment.