Professional Documents
Culture Documents
Example:
int num [2][3] ;
10 20 30
40 50 60
int main()
{
for( x=0;x<=4;x++)
{
cout<< "Rectangle "<< x +1<<endl;
cout<< "Length : " ;
cin>> a[0][x];
cout<< "Width : ";
cin>> a[1][x];
a[2][x]= a[0][x] * a[1][x];
cout<< " Area : " << a[2][x];
cout<<"\n\n\n";
}
return 0;
}
int main()
{
for( x=0;x<=4;x++)
{
cout<< "Rectangle "<< x +1<<endl;
cout<< "Length : " ;
cin>> a[x][0];
cout<< "Width : ";
cin>> a[x][1];
a[x][2]= a[x][0] * a[x][1];
cout<< " Area : " << a[x][2];
cout<<"\n\n\n";
}
return 0;
}