P

#### Pramod

Main objective is input from keyoard to enter elements into the

matrix .

Thanks in advance

#include<iostream>

#include<math.h>

#include<cstdlib>

using namespace std;

int main()

{

double **a;

int i,j,n;

cout<<"Enter size of the matrix\n";

cin>>n;

a=new double* [n];

for(i=0;i<n;i++)

a

*=new double[n+1];*

for(i=0;i<n;i++){

for(j=0;j<n;j++)

cin>>a

for(i=0;i<n;i++){

for(j=0;j<n;j++)

cin>>a

*[j];*

cout<<endl;

}

for(i=0;i<n;i++){

for(j=0;j<n;j++)

cout<<acout<<endl;

}

for(i=0;i<n;i++){

for(j=0;j<n;j++)

cout<<a

*[j]<<"\t";*

cout<<endl;

}

delete [] a;

}

thanku Chris for your program. after running yourprogram following

errors are coming ,can expalined in detailes please .

Enter size of the matrix: 2

Traceback (most recent call last):

File "two.py", line 16, in <module>

stringified = "\n".join("\t".join(row) for row in a)

File "two.py", line 16, in <genexpr>

stringified = "\n".join("\t".join(row) for row in a)

TypeError: sequence item 0: expected string, float found

Thanks in Advancecout<<endl;

}

delete [] a;

}

thanku Chris for your program. after running yourprogram following

errors are coming ,can expalined in detailes please .

Enter size of the matrix: 2

Traceback (most recent call last):

File "two.py", line 16, in <module>

stringified = "\n".join("\t".join(row) for row in a)

File "two.py", line 16, in <genexpr>

stringified = "\n".join("\t".join(row) for row in a)

TypeError: sequence item 0: expected string, float found

Thanks in Advance