Advertisement
chete

suma complejo

Mar 26th, 2014
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3. public class ClienteComplejo {
  4. public static void main(String[] args){
  5.     Scanner lee=new java.util.Scanner(System.in);
  6.     double x,y,z,k;
  7.  
  8.      
  9.      System.out.println("introduzca 4 numeros");
  10.      x= lee.nextDouble();//this.x
  11.      y= lee.nextDouble();//this.y
  12.      z= lee.nextDouble();//z.x
  13.      k= lee.nextDouble();//z.y
  14.      
  15.      Complejos z1 = new Complejos(x,y);
  16.      Complejos z2 = new Complejos(x,y);
  17.      Complejos z3 = z1.suma.(z2);
  18.      
  19.      
  20.      for(int i = 0; i < 100; i++){
  21.          new Complejos(i,i+1);
  22.          }
  23.      System.out.println("La suma es "+ getReal() + "+" + getImaginaria() + getNumbObjetos());
  24.      
  25.      
  26.      
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement