oright. where is the assignment?
help urgently neededView more random threads:
- appreciation
- Need help with fees schedule
- gdb required mkt 624 idea solution required
- operating assinment solution help
- Ups or inverter
- mth601 : solution needed
- helpppppppppppp meeeeeee plzzzzzz :(
- Today Scorpio Daily Horoscope 6th February 2016
- papers
- research paper on japan Oshika Peninsula of Tōhoku...
Sponsored Links
oright. where is the assignment?
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
welcome pari
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
plz snd me solution
prince g. i told you that it will be here. just wait. working dear. light nay buhat tang keya howa hai.
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
aslamo elakum bhai cs 201 ki asignment 2 man help chahye
kia help chaheya app ko?
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
Dear Mr. Xpert, Solution required for CS201 Assignment # 2.
Thanks
#include <iostream>
#include <iomanip>
using namespace std;
void fill(int[][3]);
void print(int[][3]);
void printa(int[]);
void combine(int[][3],int[][3],int[]);
int main()
{int a[3][3],b[3][3],c[18];
cout"Matrix a\n";
fill(a);
cout"Matrix b\n";
fill(b);
cout"Matrix a\n";
print(a);
cout"Matrix b\n";
print(b);
combine(a,b,c);
cout"The sorted merged array\n";
printa(c);
system("pause");
return 0;
}
void printa(int a[])
{int i;
for(i=0;i<18;i++)
coutsetw(4)a[i];
coutendl;
}
void fill(int a[][3])
{int i,j;
cout"Enter the elements of the matrix :\n";
for(i=0;i<3;i++)
for(j=0;j<3;j++)
{cout"Enter element ["i"]["j"]: ";
cin>>a[i][j];
}
}
void print(int a[][3])
{int i,j;
for(i=0;i<3;i++)
{for(j=0;j<3;j++)
coutsetw(4)a[i][j];
cout"\n";
}
cout"\n";
}
void combine(int a[][3],int b[][3],int c[])
{bool atemp[3][3]={false};
bool btemp[3][3]={false};
int i,j,upto=0,it,jt,in,max;
for(upto=0;upto<18;upto++)
{
max=-99999;
for(i=0;i<3;i++)
for(j=0;j<3;j++)
if(!atemp[i][j])
if(a[i][j]>max)
{max=a[i][j];
it=i;
jt=j;
in=0;
}
for(i=0;i<3;i++)
for(j=0;j<3;j++)
if(!btemp[i][j])
if(b[i][j]>max)
{max=b[i][j];
it=i;
jt=j;
in=1;
}
c[upto]=max;
if(in==0)
atemp[it][jt]=true;
else
btemp[it][jt]=true;
}
}
There are currently 1 users browsing this thread. (0 members and 1 guests)