Función que calcule el producto punto y el producto Cruz de dos vectores
#include <iostream> #include <math.h> using namespace std; /** * * @param u * @param v * @param w * @return Producto Punto */ float productoPunto(float u[], float v[], int w){ float r = 0; for(int i = 0; i < w; i++){ r += (u[i] * v[i]); } return r; } /** * * @param u * @param v * @param w * @return Producto Cruz */ float productoCruz(float u[], float v[], int w){ float r = 0; for(int i = 0; i < w; i++){ r += (u[(i + 1) % w] * v[i]); } return r; } int main(int argc, char const *argv[]) { int w =