Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS 201 Assignment # 2 Solution idea Spring 2011
#1
help urgently needed
Reply
#2
oright. where is the assignment?
Reply
#3
Xpert Wrote:oright. where is the assignment?

check the attachments
thanks


Attached Files
.doc   Spring 2011_CS201_2.doc (Size: 166 KB / Downloads: 743)
Reply
#4
welcome pari
Reply
#5
plz snd me solution Confusedmileys3:
Reply
#6
prince g. i told you that it will be here. just wait. working dear. light nay buhat tang keya howa hai.
Reply
#7
[SIZE="6"]aslamo elakum bhai cs 201 ki asignment 2 man help chahye [/SIZE]
Reply
#8
kia help chaheya app ko?
Reply
#9
Dear Mr. Xpert, Solution required for CS201 Assignment # 2.
Thanks
Reply
#10
#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©;
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;
}
}
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  get your solution in 24 hours 2020 Xpert 0 8,800 10-11-2020, 10:09 PM
Last Post: Xpert
  get your solution in 24 hours 2020 Xpert 0 3,182 10-11-2020, 10:09 PM
Last Post: Xpert
  vuhelp.com forum is providing solution of virutal university students in 24 hour 2014 Xpert 3 2,489 11-17-2014, 06:11 PM
Last Post: leo861323
  GDB of FIN730 - Investment Analysis & Portfolio Management (Need Solution) Muhammad Husnain Mughal 1 1,876 05-15-2014, 08:21 PM
Last Post: hondasr8
  GDB of FIN723 - Taxation Management (Need Solution) Muhammad Husnain Mughal 1 2,930 05-07-2014, 04:09 AM
Last Post: Vuhelper
  Need ACC501 - Business Finance Assignment No 2 Solution. Umar Abbas 2 4,251 02-07-2014, 08:23 PM
Last Post: Umar Abbas
  operating assinment solution help nenanena 9 6,103 08-18-2013, 03:53 AM
Last Post: Xpert
  sta301 assignment 4 27 jun bc110200090 6 3,580 01-26-2013, 02:05 AM
Last Post: Vuhelper
  cs506 2nd assignment millee 0 2,659 12-04-2012, 11:30 PM
Last Post: millee
  cs506 2nd Assignment Neelam Ahmad 5 3,127 12-04-2012, 11:24 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)