Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
15
Task/Arithmetic-Complex/Crystal/arithmetic-complex.cr
Normal file
15
Task/Arithmetic-Complex/Crystal/arithmetic-complex.cr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
require "complex"
|
||||
|
||||
a = Complex.new(1, 2)
|
||||
b = 3 + 4.i
|
||||
|
||||
puts "a = #{a}, b = #{b}"
|
||||
puts
|
||||
puts "a + b = #{a + b}"
|
||||
puts "a - b = #{a - b}"
|
||||
puts "a * b = #{a * b}"
|
||||
puts "a / b = #{a / b}"
|
||||
puts
|
||||
puts "-a = #{-a}"
|
||||
puts "1/a = #{a.inv}"
|
||||
puts "ā = #{a.conj}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue