Hi~! I want to compute the sum of "A",but it doesn't print the right result. I don't know how to modify it! Can you give me some suggestions? how about Nested ?

double x,y,A=0;

#pragma omp parallel for num_threads(4) private(x,y) reduction(+:A)

for(m=1;m<=num;m++)

{

x=m*1.0;

for(n=1;n<=num;n++)

{

y=n*1.0;

A=A+(x+y);

}

}

cout<<"A: "<<A<<endl;