Advertisement
jfcmacro

Ejecutar.java

Mar 6th, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1.  
  2. /**
  3.  * Write a description of class Ejecutar here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. public class Ejecutar
  9. {
  10.     public static void main(String [] args) {
  11.       NumComplejo nc1 = new NumComplejo(2,3);
  12.       NumComplejo nc2 = new NumComplejo(9,6);
  13.       NumComplejo nc3 = new NumComplejo(9,5);
  14.      
  15.       NumComplejo nc4 = nc1.multiplicar(nc2).escalar(3).sumar(nc3);
  16.       NumComplejo nc5 = nc1.multiplicar(nc2).escalar(0.5).sumar(nc3);
  17.      
  18.       System.out.println("nc4 real: " + nc4.obtReal() + " img: "
  19.                                       + nc4.obtImg());
  20.       System.out.println("nc5 real: " + nc5.obtReal() + " img: "
  21.                                       + nc5.obtImg());                                
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement