aboutsummaryrefslogtreecommitdiff
path: root/semestre 4/java/tme/tp2/TestComplexe.java
blob: 1be9c8e00f75a49559739c69402ed7d20464bc18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
public final class TestComplexe {
    public static void main(String[] args) {
        final Complexe[] cs = {new Complexe(), new Complexe(), new Complexe()};
        for (var c : cs) System.out.println("real " + c.estReel());
        for (var c1 : cs) {
            for (var c2 : cs) {
                System.out.println("(" + c1 + ") + (" + c2 + ") = " + c1.addition(c2));
                System.out.println("(" + c1 + ") * (" + c2 + ") = " + c1.multiplication(c2));
            }
        }
    }
}