Math Projeact280
Math Projeact280
Math Projeact280
Student Details
Name ID
1. Rukonuzzaman Topu 232002280
[For Teachers use only: Don’t Write Anything inside this box]
Comments :
I used C programming language to solve this. It was slightly
challenging at first because of the matrix format. I used array , for
loop to solve this.
Code 2:
#include <stdio.h>
int main() {
int ar[11][1][2] = {
{{4, 15}},
{{0, 25}},
{{15, 21}},
{{18, 19}},
{{5, 12}},
{{6, 0}},
{{16, 5}},
{{18, 6}},
{{5, 3}},
{{20,12}},
{{25,0}}
};
int mat[2][2] = {
{1, 2},
{1, 3}
};
int result[11][2];
for (int i = 0; i < 11; i++) {
for (int j = 0; j < 1; j++) {
for (int k = 0; k < 2; k++) {
int sum = 0;
for (int l = 0; l < 2; l++) {
sum += mat[k][l] * ar[i][j][l];
}
result[i][k] = sum;
}
}
}
printf("Encoded message:\n\n");
for (int i = 0; i < 11; i++) {
for (int j = 0; j < 2; j++) {
printf("%d ", result[i][j]);
}
}
printf("\n");
return 0;
}
Comment :
Here i used C language to solve this. I took “Do Yourself Perfectly” as
Encoded Message. Here i used array and loops to solve the problem.
Code 3:
#include <stdio.h>
#include <stdlib.h>
int main() {
// Coefficients of the equations
float coefficients[2][3] = {{10, 6, 90}, {3, 5, 70}};
return 0;
}
Out put 3: