Prog 11: Write a program to
made matrix of size m*n by using
UDF
#include<iostream .h>
#include<conio.h>
void matrix();
void matrix()
{
int m,n,a[5][5],i,j; cout<<"enter
the value of m:"; cin>>m;
cout<<"enter the
value of n:";
cin>>n;
cout<<"enter
the values for Matrix:"<
for(i=0;i
{
for(j=0;j<n;j++)
{
cin>>a[i][j];
}
}
cout<<"Matrix is:"<n dl;
for(i=0;i
{
for(j=0;j<n;j++)
{
cout<[i][j];
cout<<"\t";
}
cout<<"\n";
}
}
No comments:
Post a Comment