matrix using open file

hallo... firstly, i wold like to ask u about matrix.. my project are going using open file format.

this is my matrix form . in this case, this is only use for adding... but if i want to do a multiple and minus the matrix, is it i should do a format "switch"?
after that, i would like to do an open file..so how it will be done sir?? please help me

#include<iostream.h>

using namespace std;

main()
{
int m, n, c, d, first[10][10], second[10][10], sum[10][10];

cout << "Enter the number of rows and columns of matrix ";
cin >> m >> n;
cout << "Enter the elements of first matrix\n";

for ( c = 0 ; c < m ; c++ )
for ( d = 0 ; d < n ; d++ )
cin >> first[c][d];

cout << "Enter the elements of second matrix\n";

for ( c = 0 ; c < m ;c++ )
for ( d = 0 ; d < n ; d++ )
cin >> second[c][d];

for ( c = 0 ; c < m ; c++ )
for ( d = 0 ; d < n ; d++ )
sum[c][d] = first[c][d] + second[c][d];

cout << "Sum of entered matrices:-\n";

for ( c = 0 ; c < m ; c++ )
{
for ( d = 0 ; d < n ; d++ )
cout << sum[c][d] << "\t";

cout << endl;
}
please put your code nto code syntax, it is not easy to read your code.
what do you mean with "open file format" ? and what do you mean with " format switch" ?
Topic archived. No new replies allowed.