I tried to edit your post to get rid of the extraneous spaces but there were a few lines lost in translation.
Your code is actually very basic but it is difficult to see the forest through the trees because it is so cluttered. Much of that is due to repeated sequences of code. These should be made into functions. I will show you a couple of examples.
void InputArray( const char * text, double array[], int size )
{
cout<<"_________________________________________" << endl;
cout<<"enter the new vector " << text << " : " << endl;
for(int i=0;i<size;i++)
{
cin>>array[i];
}
}
void OutputArray( const char * text, const double array[], int size )
{
cout<< text <<endl;
for(int i=0;i<size;i++)
{
cout << array[ i ] <<fixed << setprecision(4) << endl;
}
cout<<" ______________________________________________"<<endl;
}
then you can use these two function any time you want to input or output and array and I see that you do that many times in your code. Now your code can look like this :
InputArray( "enter values of vector 1:", arr, Size );
InputArray( "enter values of vector 2:", Arr, Size );
InputArray( "enter values of vector 3:", A, Size );
OutputArray( "vector 1 values : ", arr, Size );
OutputArray( "vector 2 values : ", Arr, Size );
OutputArray( "vector 3 values : ", A, Size );
these functions can be used later in your code also :
OutputArray( "y1=", M, Size );
OutputArray( "y2=", N, Size );
OutputArray( "y3=", S, Size );
This will clean up your code considerably and let you see the computational logic more clearly.
One other tip : consider putting all of your input values into a file and then reading the data from it. You don't have to do much at all to your logic. The key is in how you run the program. If you have your input in a file called, 'InputData.txt" then to run your program you can type this at a command prompt : "YourProgram < InputData.txt" and it will read the data file just as if you had entered the data by hand. This will speed up your debugging process A LOT!