#includeThis implementation takes in a vector of floats, calculates the magnitude of the vector using the Pythagorean theorem, and then divides each element by the magnitude to obtain the normalized vector. The result is then printed to the console.#include #include void normalize(std::vector & arr) { float mag = 0.0; for (float val : arr) { mag += val * val; } mag = std::sqrt(mag); for (float& val : arr) { val /= mag; } } int main() { std::vector arr {3.0, 4.0, 5.0}; normalize(arr); for (float val : arr) { std::cout << val << " "; } std::cout << std::endl; return 0; }