Skip to content
Snippets Groups Projects
Commit f54e6b1c authored by Mikołaj Warenycia's avatar Mikołaj Warenycia
Browse files

Upload New File

parent a3e7aea1
Branches
No related merge requests found
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
int main() {
float mat[4][3][3];
printf("podaj panocku te macierzowe numyrki do dwoch macierzy 2x2, w sumie 8\n");
for (int i = 1; i < 3; i++){
for (int ii = 1; ii < 3; ii++){
for (int iii = 1; iii < 3; iii++){
scanf("%f", &mat[i][ii][iii]);
}}}
mat[3][1][1] = mat[1][1][1]*mat[2][1][1]+mat[1][1][2]*mat[2][2][1];
mat[3][1][2] = mat[1][1][1]*mat[2][1][2]+mat[1][1][2]*mat[2][2][2];
mat[3][2][1] = mat[1][2][1]*mat[2][1][1]+mat[1][2][2]*mat[2][2][1];
mat[3][2][2] = mat[1][2][1]*mat[2][1][2]+mat[1][2][2]*mat[2][2][2];
printf("oto iloczon macierzy pana twego\n");
printf("%f %f\n", mat[3][1][1], mat[3][1][2]);
printf("%f %f\n", mat[3][2][1], mat[3][2][2]);
return 0;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment