Created
September 11, 2019 16:22
-
-
Save xuanthulabnet/ec8c1fc448b42b94422ed6af1e06f76a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package net.xuanthulab; | |
| /*** | |
| * Gọi TestComplex.Test() trong hàm Main để kiểm tra | |
| */ | |
| public class TestComplex { | |
| public static void Test() { | |
| Complex a = new Complex(5.0, 6.0); | |
| Complex b = new Complex(-3.0, 4.0); | |
| StdOut.println("a = " + a); | |
| StdOut.println("b = " + b); | |
| StdOut.println("Re(a) = " + a.getRe()); | |
| StdOut.println("Im(a) = " + a.getIm()); | |
| StdOut.println("b + a = " + Complex.cong(a, b)); | |
| StdOut.println("a - b = " + Complex.tru(a, b)); | |
| StdOut.println("a * b = " + Complex.nhan(a, b)); | |
| StdOut.println("a / b = " + Complex.chia(a, b)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment