()
| 17 | } |
| 18 | // Function to display data that has been taken as input from user |
| 19 | public void display() { |
| 20 | System.out.println("Entered first complex number is: " + real1 + " + " + imag1 + "i"); |
| 21 | System.out.println("Entered second complex number is: " + real2 + " + " + imag2 + "i"); |
| 22 | } |
| 23 | // Function to add two complex numbers |
| 24 | public void add() { |
| 25 | double addr = real1 + real2; |