import java.util.Scanner;
public class SumaRestaVectores{

public static void main(String args[])
{     System.out.println("suma y resta de vectores");
     Scanner teclado = new Scanner(System.in);

     Vector vector1 = null;
     Vector vector2 = new Vector();
      for (long i = 1; ; ++i)
      {
         System.out.println("\nVector" + i);
         if ( ! vector2.leer() )
            return;
         
         System.out.println(vector2);
      
         Vector suma= new Vector(); 
         suma = suma.sumar(vector2);
         Vector magnitudes= new Vector();
         magnitudes= magnitudes.magnitud(vector2);
         
         System.out.println("v"+i+ vector1+" + vr"+ (i+1)+ vector2+" :(x,y)= "+ suma+"(r,ángulo)= "  );
          
         Vector resta1= new Vector(); 
         resta1 = resta1.restar1(vector2);
         System.out.println("v"+i+ vector1+" - v"+ (i+1) +vector2+" : (x,y)= "+ resta1+"(r,ángulo)= ");
         
         Vector resta2= new Vector(); 
         resta2 = resta2.restar2(vector2);
         System.out.println("v"+i+ vector1+" - v"+ (i+1)+ vector2+" : (x,y)= "+ resta2+"(r,ángulo)= ");
         
         
         
         
         
         if ( vector1 != null )
         {
         vector1 = vector2;
         vector2 = new Vector();
      }
      
}
  
      
      
}
 }     
