Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_141128_MatricesProducto
//Title of this code #include <stdio.h> #include <stdlib.h> #include <time.h> #define _FA 4 #define _CA 5 #define _FB _CA #define _CB 6 #define _FM _FA #define _CM _CB int main(void) { long A[_FA][_CA]; long B[_FB][_CB]; long M[_FM][_CM]; short f, c, k; for(srand(time(NULL)) , f = 0 ; f < _FA ; f++) { for(c = 0 ; c < _CA ; c++) { A[f][c] = rand() % 10; } } for(f = 0 ; f < _FB ; f++) { for(c = 0 ; c < _CB ; c++) { B[f][c] = rand() % 10; } } for(f = 0 ; f < _FM ; f++) { for(c = 0 ; c < _CM ; c++) { M[f][c] = 0; for(k = 0 ; k < _CA ; k++) { M[f][c] += A[f][k] * B[k][c]; } } } for(f = 0 ; f < _FA ; f++) { for(c = 0 ; c < _CA ; c++) { printf("%3ld", A[f][c]); } printf("\n"); } printf("\n\n\n"); for(f = 0 ; f < _FB ; f++) { for(c = 0 ; c < _CB ; c++) { printf("%3ld", B[f][c]); } printf("\n"); } printf("\n\n\n"); for(f = 0 ; f < _FM ; f++) { for(c = 0 ; c < _CM ; c++) { printf("%5ld", M[f][c]); } printf("\n"); } printf("\n\n\n"); return 0; }
run
|
edit
|
history
|
help
0
Swap.c
18BCE2182 ASSESS_1 Q1-7
orange blue bell Einstein's piece chastitise then
strrev
Stub Program for Problem 3 HW 2
Assignment 4
A_141121_factorial02
simple insertion sort
Float data type.c
B_141104_NotaSwitch