how to calculate he norm (magnitude) of the vector A = (a1, a2, ... ,an).
#include<iostream>
using namespace std;
double norm (double [],int);
int main () {
const double n=3;
double a[3]={3,5,7};
double n;
for(int i=0;i<3;i++)
cout<<a[i]<<endl;
n=norm(a,3);
return 0;
}
double norm(double x[],int size) {
I couldnt continue .I tried writing a suitable code but I coundnt how can I solve this guestion?Could anyone help me please?