#include <stdio.h>
#include <math.h>
double VecNorm(double V[], int dim)
{
int i = 0;
double SQRSUM = 0.0;
for ( i = 0; i < dim; i++)
{
SQRSUM += V[i] * V[i];
}
}
int main()
{
double x[3]={1,2,3};
double y=0;
printf("Hello, World! y=%f \n",VecNorm
(x
,3));
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CmRvdWJsZSBWZWNOb3JtKGRvdWJsZSBWW10sIGludCBkaW0pCnsKICAgIGludCBpID0gMDsKICAgIGRvdWJsZSBTUVJTVU0gPSAwLjA7CiAgICBmb3IgKCBpID0gMDsgaSA8IGRpbTsgaSsrKQogICAgewogICAgICAgIFNRUlNVTSArPSBWW2ldICogVltpXTsKICAgIH0KICAgIAogICAgcmV0dXJuIHNxcnQoU1FSU1VNKTsKCn0KaW50IG1haW4oKQp7CiAgICBkb3VibGUgeFszXT17MSwyLDN9OwogICAgZG91YmxlIHk9MDsKICAgIHByaW50ZigiSGVsbG8sIFdvcmxkISB5PSVmIFxuIixWZWNOb3JtKHgsMykpOwogICAgCgogICAgcmV0dXJuIDA7Cn0=