#include #include int main(int argc, char* argv[]) { if(argc < 3) { printf("Za malo argumentow"); return 0; } int rowlength,collength,row2length,col2length; int row=0,col=0; printf("Input number of rows for the first array!"); scanf("%d",&rowlength); printf("Input number of columns for the first array!"); scanf("%d",&collength); printf("Input number of rows for the second array!"); scanf("%d",&row2length); printf("Input number of columns for the second array!"); scanf("%d",&col2length); int tab[rowlength][collength],tab1[row2length][col2length]; int tab2[rowlength][col2length]; printf("Elements in the text file:\n\n"); FILE* file = fopen(argv[1], "r"); ReaderValues(file,rowlength,collength,row2length,col2length, tab, tab1); fclose(file); Multiplication(rowlength,collength,row2length,col2length, tab, tab1,tab2,argv); Save(rowlength, col2length, tab2, argv); return 0; } void ReaderValues(FILE* file, int rowlength, int collength, int row2length, int col2length, int tab[rowlength][collength], int tab1[row2length][col2length]) { int row=0,col=0; while( fscanf( file, "%d,", &tab[row][col] ) != EOF ) //WCZYTYWANIE WARTOŚCI Z PLIKU TXT DO 2 TABLIC { printf("%d ", tab[row][col]); col++; if(col==collength && row==rowlength-1) { printf("\n\n"); row=0; col=0; while( fscanf( file, "%d,", &tab1[row][col] ) != EOF ) { printf("%d ", tab1[row][col]); col++; if(col==col2length) { printf("\n"); col=0; row++; } } } if(col==collength) { printf("\n"); col=0; row++; } } printf("\n"); } int Multiplication(int rowlength, int collength, int row2length, int col2length, int tab[rowlength][collength],int tab1[row2length][col2length],int tab2[rowlength][col2length]) // MNOŻENIE MACIERZY { int i,j,k; printf("Result of multiplication:\n\n"); for(i=0; i