Hello.. i've this HW.. i did what i can do.. but there were some errors that i couldn't fix.. and one point i dunnu how to do it which is change negative variables to positive ones?? can someone tell me how to code that?
here is my code:
#include <iostream>
using namespace std;
int main ()
{
int ARR [2][3];
int i,j;
cout<<"You are going to fill a 2x3 array,"<<endl
<<"meaning 2 rows and in each row 3 items."<<endl<<endl
<<"Please enter 3 positive values separated by a space for row0:";
for(int i=0;i>=1;i++)
{
cin>>ARR [i];
}
cout<<"Please enter 3 negative values separated by a space for row1:";
for(int j=0;j>=2;j++)
{
cin>>ARR [j];
}
cout<<"Array elements after filling array are:"
<<"_________________________________________"<<endl<<endl
<<"Row#0:"
<<ARR [i]
<<endl
<<"Row#1:"
<<ARR [j]
<<endl<<endl
<<"Array elements after changing negative array values to positive values are:"
<<"___________________________________________________________";
cout<<"Row#0:";
for (int i=0;i>=1;i++)
{
cout<<"The array element:"<<i;
}
cout<<"Row#1:";
for (int j=0;j>=2;j++)
{
cout<<"The array element:"<<+j;
}
return 0;
}
Attached is the desired output.