ESTUDIANTE  :  JOEL PATZI PEÑA

                       Podemos resolver cualquier ejercicio del siguiente menú:

el siguiente video "demuestra las propiedades" y "resuelve un

ejercicio por cada subtítulo del menú mostrado anterior-

mente", igualando así los resultados obtenidos prácticamen- te con los resultados obtenidos con el programa.

"VECTORES"

                    vectores

1.- MÓDULO DE UN VECTOR.       
2.- ÁLGEBRA DE VECTORES.       
3.- PRODUCTO ESCALAR.          
4.- Hallar el ángulo entre dos vectores en el espacio.
5.- PRODUCTO VECTORIAL.        
6.- TRIPLE PRODUCTO ESCALAR.   
7.- TRIPLE PRODUCTO VECTORIAL.                   

gears-153639_640

 

PROGRAMA

 

                 *el siguiente programa fue codificado en Java NetBeans 8.0.2  *

*el siguiente programa fue codificado en Java NetBeans 8.0.2  *

         CÓDIGO:

package programa_joel;

import java.util.*;
import java.math.*;

public class Programa_Joel {

    public static void main(String[] args) {
        
        int volver_menu_principal, volmenu;
        volver_menu_principal = 1;
        volmenu = 2;
        do {
            System.out.print("          VECTORES      \n" //MENU PRINCIPAL
                    + "1.- MÓDULO DE UN VECTOR.       \n"
                    + "2.- ÁLGEBRA DE VECTORES.       \n"
                    + "3.- PRODUCTO ESCALAR.          \n"
                    + "4.- Hallar el ángulo entre dos vectores en el espacio.\n"
                    + "5.- PRODUCTO VECTORIAL.        \n"
                    + "6.- TRIPLE PRODUCTO ESCALAR.   \n"
                    + "7.- TRIPLE PRODUCTO VECTORIAL. \n"
                    + "8.- SALIR.                     \n"
                    + "elige una opción...  ");
            int opcion;

            Scanner introducir = new Scanner(System.in);
            Scanner in = new Scanner(System.in);  //pausar
            opcion = introducir.nextInt();

            switch (opcion) {
                case 1:
                    //  MODULO DE UN VECTOR
                    int k;   //para for vector
                    double suma_potencias;
                    double modulo_de_un_vector;//para raiz
                    int Vector[];
                    System.out.print("\n\n   MÓDULO DE UN VECTOR");
                    System.out.print("\n      A = (a1,a2,a3)"
                            + "\n     |A| = √(a1²,a2²,a3²)");
                    System.out.print("\ningrese el vector A para hallar su módulo\n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int Va[] = new int[4];
                    for (k = 1; k < 4; k++) {
                        System.out.print(" ingrese a" + k + "=");
                        Va[k] = introducir.nextInt();
                    }
                    suma_potencias = (Math.pow(Va[1], 2) + Math.pow(Va[2], 2) + Math.pow(Va[3], 2));
                    modulo_de_un_vector = Math.sqrt(suma_potencias);
                    System.out.print("\nEl módulo del vector A(" + Va[1] + "," + Va[2] + "," + Va[3] + ") es:"
                            + "\n  |A| = " + modulo_de_un_vector);
                    System.out.print("\n\nintroduzca cualquier carácter para volver al menu principal... ");
                    String auxiliar0 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin MODULO DE UN VECTOR
                    ;
                    break;
                case 2:
                    int regresar_menu_algebra;
                    do {                           //regresa al menu algebra
                        regresar_menu_algebra = 1;
                        System.out.print("\n\n      ÁLGEBRA DE VECTORES\n");
                        System.out.print("1.- SUMA\n");
                        System.out.print("2.- RESTA\n");
                        System.out.print("3.- PRODUCTO POR UN ESCALAR\n");
                        System.out.print("4.- VOLVER AL MENÚ PRINCIPAL\n");
                        System.out.print("elige una opción...  ");

                        int opcion_algebra;
                        opcion_algebra = introducir.nextInt();
                        switch (opcion_algebra) {
                            case 1:    //SUMA DE VECTORES
                                int regresar_menu_suma;
                                do {
                                    regresar_menu_suma = 1;
                                    System.out.print("\n\n     SUMA DE VECTORES\n");
                                    System.out.print("1.- SUMA DE DOS VECTORES\n");
                                    System.out.print("2.- SUMA DE 3 VECTORES\n");
                                    System.out.print("3.- VOLVER\n");
                                    System.out.print("elige una opción...  ");
                                    int opcion_suma;
                                    opcion_suma = introducir.nextInt();
                                    switch (opcion_suma) {
                                        case 1:
                                            //Algebra Vectorial suma de 2 vectores//   
                                            int i;   //para for vector
                                            int suma_primeros_componentes,
                                             suma_segundos_componentes,
                                             suma_terceros_componentes;

                                            System.out.print("\n\n    SUMA DE DOS VECTORES \n"
                                                    + "        Suma: A+B\n");
                                            System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                                            int vector1[] = new int[4];
                                            for (i = 1; i < 4; i++) {
                                                System.out.print(" ingrese a" + i + "=");
                                                vector1[i] = introducir.nextInt();
                                            }
                                            System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                                            int vector2[] = new int[4];
                                            for (i = 1; i < 4; i++) {
                                                System.out.print(" ingrese b" + i + "=");
                                                vector2[i] = introducir.nextInt();
                                            }
                                            suma_primeros_componentes = vector1[1] + vector2[1];
                                            suma_segundos_componentes = vector1[2] + vector2[2];
                                            suma_terceros_componentes = vector1[3] + vector2[3];
                                            System.out.print("\nLA SUMA DE LOS VECTORES A y B es:\n     "
                                                    + "A=(" + vector1[1] + "," + vector1[2] + "," + vector1[3] + ")   " + "B=(" + vector2[1] + "," + vector2[2] + "," + vector2[3] + ")"
                                                    + "\n         A+B=(" + suma_primeros_componentes + "," + suma_segundos_componentes + "," + suma_terceros_componentes + ")\n");
                                            System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                                            String auxiliar1 = in.next();      //pausarr
                                            System.out.print("\n\n");
                                            //fin algebra vectorial suma 2 vectores

                                            ;
                                            break;
                                        case 2:
                                            //Algebra Vectorial suma de 3 vectores//   
                                            int j;   //para for vector
                                            int suma_primeros_componentes1,
                                             suma_segundos_componentes1,
                                             suma_terceros_componentes1;

                                            System.out.print("    SUMA DE TRES VECTORES \n"
                                                    + "        Suma: A+B+C\n");
                                            System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                                            int Va1[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese a" + j + "=");
                                                Va1[j] = introducir.nextInt();
                                            }
                                            System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                                            int Vb[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese b" + j + "=");
                                                Vb[j] = introducir.nextInt();
                                            }
                                            System.out.print("vector: C(c1,c2,c3)\n");   //tercer vector
                                            int Vc[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese c" + j + "=");
                                                Vc[j] = introducir.nextInt();
                                            }
                                            suma_primeros_componentes1 = Va1[1] + Vb[1] + Vc[1];
                                            suma_segundos_componentes1 = Va1[2] + Vb[2] + Vc[2];
                                            suma_terceros_componentes1 = Va1[3] + Vb[3] + Vc[3];
                                            System.out.print("\nLA SUMA DE LOS VECTORES A, B y C es:\n     "
                                                    + "A=(" + Va1[1] + "," + Va1[2] + "," + Va1[3] + ")   " + "B=(" + Vb[1] + "," + Vb[2] + "," + Vb[3] + ")   " + "C=(" + Vc[1] + "," + Vc[2] + "," + Vc[3] + ")"
                                                    + "\n              A+B+C=(" + suma_primeros_componentes1 + "," + suma_segundos_componentes1 + "," + suma_terceros_componentes1 + ")\n");
                                            //fin algebra vectorial suma 3 vectores
                                            System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                                            String auxiliar2 = in.next();      //pausarr
                                            System.out.print("\n\n");
                                            ;
                                            break;
                                        case 3:
                                            regresar_menu_algebra = 0;
                                            ;
                                            break;
                                        default:
                                            System.out.print("opción invalida");
                                            regresar_menu_suma = 0;
                                            ;
                                            break;
                                    }
                                } while (regresar_menu_suma == 0);
                                ;
                                break;
                            //opcion2 resta de vectores
                            case 2:
                                int regresar_menu_resta;
                                do {
                                    regresar_menu_resta = 1;
                                    System.out.print("\n\n     RESTA DE VECTORES \n");
                                    System.out.print("1.- RESTA DE DOS VECTORES\n");
                                    System.out.print("2.- RESTA DE 3 VECTORES\n");
                                    System.out.print("3.- VOLVER\n");
                                    System.out.print("elige una opción...  ");
                                    int opcion_resta;
                                    opcion_resta = introducir.nextInt();
                                    switch (opcion_resta) {
                                        case 1:
                                            //Algebra Vectorial resta de 2 vectores//   
                                            int i;   //para for vector
                                            int resta_primeros_componentes,
                                             resta_segundos_componentes,
                                             resta_terceros_componentes;

                                            System.out.print("    RESTA DE DOS VECTORES \n"
                                                    + "        Resta: A-B\n");
                                            System.out.print("vector: A(x1,x2,x3)\n");   //primer vector
                                            int vector1[] = new int[4];
                                            for (i = 1; i < 4; i++) {
                                                System.out.print(" ingrese x" + i + "=");
                                                vector1[i] = introducir.nextInt();
                                            }
                                            System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                                            int vector2[] = new int[4];
                                            for (i = 1; i < 4; i++) {
                                                System.out.print(" ingrese b" + i + "=");
                                                vector2[i] = introducir.nextInt();
                                            }
                                            resta_primeros_componentes = vector1[1] - vector2[1];
                                            resta_segundos_componentes = vector1[2] - vector2[2];
                                            resta_terceros_componentes = vector1[3] - vector2[3];
                                            System.out.print("\nLA RESTA DE LOS VECTORES A y B es:\n     "
                                                    + "A=(" + vector1[1] + "," + vector1[2] + "," + vector1[3] + ")   " + "B=(" + vector2[1] + "," + vector2[2] + "," + vector2[3] + ")"
                                                    + "\n       A-B=(" + resta_primeros_componentes + "," + resta_segundos_componentes + "," + resta_terceros_componentes + ")\n");
                                            System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                                            String auxiliar3 = in.next();      //pausarr
                                            System.out.print("\n\n");
                                            //fin algebra vectorial resta 2 vectores
                                            ;
                                            break;
                                        case 2:
                                            //Algebra Vectorial resta de 3 vectores//   
                                            int j;   //para for vector
                                            int resta_primeros_componentes1,
                                             resta_segundos_componentes1,
                                             resta_terceros_componentes1;

                                            System.out.print("   RESTA DE TRES VECTORES \n"
                                                    + "        Resta: A-B-C\n");
                                            System.out.print("vector: A(x1,x2,x3)\n");   //primer vector
                                            int Va2[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese x" + j + "=");
                                                Va2[j] = introducir.nextInt();
                                            }
                                            System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                                            int Vb[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese b" + j + "=");
                                                Vb[j] = introducir.nextInt();
                                            }
                                            System.out.print("vector: C(c1,c2,c3)\n");   //tercer vector
                                            int Vc[] = new int[4];
                                            for (j = 1; j < 4; j++) {
                                                System.out.print(" ingrese c" + j + "=");
                                                Vc[j] = introducir.nextInt();
                                            }
                                            resta_primeros_componentes1 = Va2[1] - Vb[1] - Vc[1];
                                            resta_segundos_componentes1 = Va2[2] - Vb[2] - Vc[2];
                                            resta_terceros_componentes1 = Va2[3] - Vb[3] - Vc[3];
                                            System.out.print("\nLA RESTA DE LOS VECTORES A, B y C es:\n     "
                                                    + "A=(" + Va2[1] + "," + Va2[2] + "," + Va2[3] + ")   " + "B=(" + Vb[1] + "," + Vb[2] + "," + Vb[3] + ")   " + "C=(" + Vc[1] + "," + Vc[2] + "," + Vc[3] + ")"
                                                    + "\n              A-B-C=(" + resta_primeros_componentes1 + "," + resta_segundos_componentes1 + "," + resta_terceros_componentes1 + ")\n");
                                            System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                                            String auxiliar1 = in.next();      //pausarr
                                            System.out.print("\n\n");
                                            //fin algebra vectorial resta3 vectores
                                            ;
                                            break;
                                        case 3:
                                            regresar_menu_algebra = 0;
                                            ;
                                            break;
                                        default:
                                            System.out.print("opción invalida\n");
                                            regresar_menu_resta = 0;
                                            break;
                                    }
                                } while (regresar_menu_resta == 0);
                                ;
                                break;
                            //Algebra hallar PRODUCTO POR UN ESCALAR
                            case 3:
                                int i;   //para for vector
                                int producto_por_un_escalar_x;
                                int producto_por_un_escalar_y;
                                int producto_por_un_escalar_z;
                                int escalar;
                                System.out.print("\n\nPRODUCTO POR UN ESCALAR");
                                System.out.print("\n   c*A = c*(a1,a2,a3)"
                                        + "\n    (c×a1,c×a2,c×a3)");
                                System.out.print("\ningrese el escalar c    "
                                        + "\n    (un número): ");
                                escalar = introducir.nextInt();
                                System.out.print("\ningrese el vector para multiplicar con el escalar \n");
                                System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                                int Va2[] = new int[4];
                                for (i = 1; i < 4; i++) {
                                    System.out.print(" ingrese a" + i + "=");
                                    Va2[i] = introducir.nextInt();
                                }
                                producto_por_un_escalar_x = escalar * Va2[1];
                                producto_por_un_escalar_y = escalar * Va2[2];
                                producto_por_un_escalar_z = escalar * Va2[3];
                                System.out.print("\nel vector resultante es:\n"
                                        + "      V(" + producto_por_un_escalar_x + "," + producto_por_un_escalar_y + "," + producto_por_un_escalar_z + ")\n");
                                System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                                String auxiliar1 = in.next();      //pausarr
                                System.out.print("\n\n");
                                //fin Algebra hallar producto escalar
                                ;
                                break;

                            case 4:     //volver menu principal desde menu algebra
                                volver_menu_principal = 0;
                                System.out.print("\n\n");
                                ;
                                break;
                        }

                    } while (regresar_menu_algebra == 0);
                    ;
                    break;
                // PRODUCTO ESCALAR
                case 3:
                    int i;   //para for vector
                    int multiplicacion_primeros_componentes,
                     multiplicacion_segundos_componentes,
                     multiplicacion_terceros_componentes;
                    int suma_de_multiplicaciones;

                    System.out.print("\n\n    PRODUCTO ESCALAR \n"
                            + "Si: A=(a1,a2,a3) B=(b1,b2,b3)\n"
                            + "A·B = (a1×b1 + a2×b2 + a3×b3)\n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int vector1[] = new int[4];
                    for (i = 1; i < 4; i++) {
                        System.out.print(" ingrese a" + i + "=");
                        vector1[i] = introducir.nextInt();
                    }
                    System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                    int vector2[] = new int[4];
                    for (i = 1; i < 4; i++) {
                        System.out.print(" ingrese b" + i + "=");
                        vector2[i] = introducir.nextInt();
                    }

                    multiplicacion_primeros_componentes = vector1[1] * vector2[1];
                    multiplicacion_segundos_componentes = vector1[2] * vector2[2];
                    multiplicacion_terceros_componentes = vector1[3] * vector2[3];
                    suma_de_multiplicaciones = (multiplicacion_primeros_componentes + multiplicacion_segundos_componentes + multiplicacion_terceros_componentes);
                    System.out.print("\nEL PRODUCTO ESCALAR DE LOS VECTORES A y B es:\n     "
                            + "A=(" + vector1[1] + "," + vector1[2] + "," + vector1[3] + ")   " + "B=(" + vector2[1] + "," + vector2[2] + "," + vector2[3] + ")"
                            + "\n         A·B=(" + suma_de_multiplicaciones + ")");
                    System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                    String auxiliar1 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin PRODUCTO ESCALAR
                    ;
                    break;
                // HALLAR ANGULO DE DOS VECTORES
                case 4:
                    int j;   //para for vector
                    int multiplicacion_escalar_primeros_componentes,
                     multiplicacion_escalar_segundos_componentes,
                     multiplicacion_escalar_terceros_componentes;
                    int suma_de_multiplicaciones_escalar;

                    System.out.print("\n\nHALLAR EL ÁNGULO ENTRE DOS VECTORES EN EL ESPACIO \n"
                            + "Si: A=(a1,a2,a3) B=(b1,b2,b3)\n"
                            + "                  A·B       \n"
                            + "  θ = Arccos ────────  \n"
                            + "                |A|×|B|     \n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int vector3[] = new int[4];
                    for (j = 1; j < 4; j++) {
                        System.out.print(" ingrese a" + j + "=");
                        vector3[j] = introducir.nextInt();
                    }
                    System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                    int vector4[] = new int[4];
                    for (j = 1; j < 4; j++) {
                        System.out.print(" ingrese b" + j + "=");
                        vector4[j] = introducir.nextInt();
                    }
                    //hallando el escalar para numerador
                    multiplicacion_escalar_primeros_componentes = vector3[1] * vector4[1];
                    multiplicacion_escalar_segundos_componentes = vector3[2] * vector4[2];
                    multiplicacion_escalar_terceros_componentes = vector3[3] * vector4[3];
                    suma_de_multiplicaciones_escalar = (multiplicacion_escalar_primeros_componentes + multiplicacion_escalar_segundos_componentes + multiplicacion_escalar_terceros_componentes); //numerador
                    //hallando los modulos para denominador
                    double angulo;
                    double angulo_en_grados;
                    double multiplicacion_modulos;
                    double suma_potencias_modulo_v1;
                    double suma_potencias_modulo_v2;
                    double modulo_de_vector_v1;
                    double modulo_de_vector_v2;
                    suma_potencias_modulo_v1 = (Math.pow(vector3[1], 2) + Math.pow(vector3[2], 2) + Math.pow(vector3[3], 2));
                    suma_potencias_modulo_v2 = (Math.pow(vector4[1], 2) + Math.pow(vector4[2], 2) + Math.pow(vector4[3], 2));
                    modulo_de_vector_v1 = Math.sqrt(suma_potencias_modulo_v1);
                    modulo_de_vector_v2 = Math.sqrt(suma_potencias_modulo_v2);
                    multiplicacion_modulos = (modulo_de_vector_v1 * modulo_de_vector_v2);
                    //angulo
                    angulo = Math.acos((suma_de_multiplicaciones_escalar) / multiplicacion_modulos);
                    //convirtiendo de radianes a grados
                    angulo_en_grados = ((angulo) * (180 / 3.141592));
                    //mostrando angulo        
                    System.out.print("\nEL ANGULO ENTRE LOS VECTORES A y B es:\n     "
                            + "A=(" + vector3[1] + "," + vector3[2] + "," + vector3[3] + ")   " + "B=(" + vector4[1] + "," + vector4[2] + "," + vector4[3] + ")"
                            + "\n  θ = " + angulo_en_grados + "° grados"
                            + "\n  θ = " + angulo + " radianes\n");
                    System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                    String auxiliar2 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin HALLAR ANGULO ENTRE DOS VECTORES
                    ;
                    break;
                //EL PRODUCTO VECTORIAL
                case 5:
                    int m;   //para for vector
                    int producto_vectorial_x;
                    int producto_vectorial_y;
                    int producto_vectorial_z;
                    System.out.print("\n\n               PRODUCTO VECTORIAL \n"
                            + "Si: A=(a1,a2,a3) B=(b1,b2,b3)\n"
                            + "    A×B = (a2×b3-a3×b2 , a3×b1-a1×b3 , a1×b2-a2×b1)\n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int V_a[] = new int[4];
                    for (m = 1; m < 4; m++) {
                        System.out.print(" ingrese a" + m + "=");
                        V_a[m] = introducir.nextInt();
                    }
                    System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                    int V_b[] = new int[4];
                    for (m = 1; m < 4; m++) {
                        System.out.print(" ingrese b" + m + "=");
                        V_b[m] = introducir.nextInt();
                    }
                    producto_vectorial_x = (V_a[2] * V_b[3] - V_a[3] * V_b[2]);
                    producto_vectorial_y = (V_a[3] * V_b[1] - V_a[1] * V_b[3]);
                    producto_vectorial_z = (V_a[1] * V_b[2] - V_a[2] * V_b[1]);
                    System.out.print("\nEL PRODUCTO VECTORIAL DE LOS VECTORES A y B es:\n     "
                            + "    A=(" + V_a[1] + "," + V_a[2] + "," + V_a[3] + ")   " + "B=(" + V_b[1] + "," + V_b[2] + "," + V_b[3] + ")"
                            + "\n             A×B=(" + producto_vectorial_x + "," + producto_vectorial_y + "," + producto_vectorial_z + ")\n");
                    System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                    String auxiliar3 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin PRODUCTO VECTORIAL
                    ;
                    break;
                // TRIPLE PRODUCTO ESCALAR;
                case 6:
                    int n;   //para for vector
                    int producto_vectorial_x1;
                    int producto_vectorial_y1;
                    int producto_vectorial_z1;
                    int producto_escalar_triple;
                    System.out.print("\n\n          TRIPLE PRODUCTO ESCALAR \n"
                            + "Si: A=(a1,a2,a3) B=(b1,b2,b3) C=(c1,c2,c3)\n"
                            + "            A·(B×C) = [ABC]\n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int Vec_a[] = new int[4];
                    for (n = 1; n < 4; n++) {
                        System.out.print(" ingrese a" + n + "=");
                        Vec_a[n] = introducir.nextInt();
                    }
                    System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                    int Vec_b[] = new int[4];
                    for (n = 1; n < 4; n++) {
                        System.out.print(" ingrese b" + n + "=");
                        Vec_b[n] = introducir.nextInt();
                    }
                    System.out.print("vector: C(c1,c2,c3)\n");   //tercer vector
                    int Vec_c[] = new int[4];
                    for (n = 1; n < 4; n++) {
                        System.out.print(" ingrese c" + n + "=");
                        Vec_c[n] = introducir.nextInt();
                    }
                    producto_vectorial_x1 = (Vec_b[2] * Vec_c[3] - Vec_b[3] * Vec_c[2]); //hallando producto vectorial
                    producto_vectorial_y1 = (Vec_b[3] * Vec_c[1] - Vec_b[1] * Vec_c[3]); //
                    producto_vectorial_z1 = (Vec_b[1] * Vec_c[2] - Vec_b[2] * Vec_c[1]); //
                    producto_escalar_triple = (Vec_a[1] * producto_vectorial_x1 + Vec_a[2] * producto_vectorial_y1 + Vec_a[3] * producto_vectorial_z1);

                    System.out.print("\nEL TRIPLE PRODUCTO ESCALAR DE LOS VECTORES A , B Y C es:\n     "
                            + "    A=(" + Vec_a[1] + "," + Vec_a[2] + "," + Vec_a[3] + ")   " + "B=(" + Vec_b[1] + "," + Vec_b[2] + "," + Vec_b[3] + ")   " + "C=(" + Vec_c[1] + "," + Vec_c[2] + "," + Vec_c[3] + ")"
                            + "\n             A·(B×C) = (" + producto_escalar_triple + ")\n");
                    System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                    String auxiliar4 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin  TRIPLE PRODUCTO ESCALAR
                    ;
                    break;
                // TRIPLE PRODUCTO VECTORIAL
                case 7:
                    int o;   //para for vector
                    int primer_producto_vectorial_b1;
                    int primer_producto_vectorial_b2;
                    int primer_producto_vectorial_b3;
                    int segundo_producto_vectorial_x;
                    int segundo_producto_vectorial_y;
                    int segundo_producto_vectorial_z;

                    System.out.print("\n\n          TRIPLE PRODUCTO VECTORIAL \n"
                            + "Si: A=(a1,a2,a3) B=(b1,b2,b3) C=(c1,c2,c3)\n"
                            + "            A×(B×C) = (x,y,z)\n");
                    System.out.print("vector: A(a1,a2,a3)\n");   //primer vector
                    int Vect_a[] = new int[4];
                    for (o = 1; o < 4; o++) {
                        System.out.print(" ingrese a" + o + "=");
                        Vect_a[o] = introducir.nextInt();
                    }
                    System.out.print("vector: B(b1,b2,b3)\n");   //segundo vector
                    int Vect_b[] = new int[4];
                    for (o = 1; o < 4; o++) {
                        System.out.print(" ingrese b" + o + "=");
                        Vect_b[o] = introducir.nextInt();
                    }
                    System.out.print("vector: C(c1,c2,c3)\n");   //tercer vector
                    int Vect_c[] = new int[4];
                    for (o = 1; o < 4; o++) {
                        System.out.print(" ingrese c" + o + "=");
                        Vect_c[o] = introducir.nextInt();
                    }
                    primer_producto_vectorial_b1 = (Vect_b[2] * Vect_c[3] - Vect_b[3] * Vect_c[2]); //hallando primer producto vectorial
                    primer_producto_vectorial_b2 = (Vect_b[3] * Vect_c[1] - Vect_b[1] * Vect_c[3]); //
                    primer_producto_vectorial_b3 = (Vect_b[1] * Vect_c[2] - Vect_b[2] * Vect_c[1]); //
                    segundo_producto_vectorial_x = (Vect_a[2] * primer_producto_vectorial_b3 - Vect_a[3] * primer_producto_vectorial_b2); //hallando segundo producto vectorial final
                    segundo_producto_vectorial_y = (Vect_a[3] * primer_producto_vectorial_b1 - Vect_a[1] * primer_producto_vectorial_b3); //
                    segundo_producto_vectorial_z = (Vect_a[1] * primer_producto_vectorial_b2 - Vect_a[2] * primer_producto_vectorial_b1); //

                    System.out.print("\nEL TRIPLE PRODUCTO VECTORIAL DE LOS VECTORES A , B Y C es:\n     "
                            + "    A=(" + Vect_a[1] + "," + Vect_a[2] + "," + Vect_a[3] + ")   " + "B=(" + Vect_b[1] + "," + Vect_b[2] + "," + Vect_b[3] + ")   " + "C=(" + Vect_c[1] + "," + Vect_c[2] + "," + Vect_c[3] + ")"
                            + "\n              A×(B×C) = (" + segundo_producto_vectorial_x + "," + segundo_producto_vectorial_y + "," + segundo_producto_vectorial_z + ")\n");
                    System.out.print("\nintroduzca cualquier carácter para volver al menú principal... ");
                    String auxiliar5 = in.next();      //pausarr
                    System.out.print("\n\n");
                    //fin  TRIPLE PRODUCTO VECTORIAL
                    ;
                    break;
                // SALIR PROGRAMA    
                case 8:
                    System.exit(0);
                 ;
                    break;
            }

        } while (volver_menu_principal == 0 || volmenu == 2);  //volver menu principal

    }
}

 

*****DESCARGUE EL CODIGO EN EL SIGUIENTE ENLACE:        


https://mega.nz/#!ph5zRT7T!d0X4xo6CLme5XcCoMwLq-mJJo6J-XJFT4_Ep02zTjRM

      

TAMBIEN PUEDE VER AQUÍ ABAJO EL CODIGO: