Adding and subtract complex numbers using OOP structure

前端 未结 3 1785
醉酒成梦
醉酒成梦 2021-01-29 10:07

I have here a code that should print the sum and difference of two complex numbers. The instructions given are:
make the methods add, subtract, and

3条回答
  •  盖世英雄少女心
    2021-01-29 10:29

    Perhaps this is not what you're looking for, but to make the number be printed isn't enough to make something like this in your print method?

    System.out.print("The number is: " +real +"+i" +imag);

提交回复
热议问题