CS201P Assignment 2 Solution Spring 2022
CS201P Assignment 2 Solution Spring 2022
CS201P Assignment 2 Solution Spring 2022
VUAnswer.com
Like BC200803333, here 2 is the first digit need to be passed in this function.
CODE Solution:
#include<iostream>
VUAnswer.com
#define ROW 3
#define COL 3
class AddMatrix{
private:
int matrix[ROW][COL];
public:
AddMatrix(){
for(int i=0;i<ROW;i++){
for(int j=0;j<COL;j++){
matrix[i][j] = 0;
}
}
}
AddMatrix(int array[]){
setMatrix(array);
}
VUAnswer.com
VUAnswer.com
for(int i=0;i<ROW;i++){
for(int j=0;j<COL;j++){
y.matrix[i][j] = id * x.matrix[i][j];
}
}
return y;
}
int main(){
VUAnswer.com
cout<<"Matrix:"<<endl;
matrix.display(matrix);
cout<<"Multiplied with first digit 2:"<<endl; // First Digit of Our VU ID
multiplied.display(multiplied);
cout<<"sum:"<<endl;
sum.display(sum);
return 0;
VUAnswer.com
CODE OUTPUT
VUAnswer.com
REGARD SARIM
WHATSAPP +923162965677
PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file
before submitting copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment must check your assignment
requirement file.
If you need some help or question about file and solutions feel
free to ask.
VUAnswer.com
VUAnswer.com