Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
B_141128_MatricesSuma
//Title of this code #include <stdio.h> #include <stdlib.h> #include <time.h> #define _F 7 #define _C 4 int main(void) { long a[_F][_C]; long b[_F][_C]; long s[_F][_C]; short f, c; for(srand(time(NULL)) , f = 0 ; f < _F ; f++) { for(c = 0 ; c < _C ; c++) { a[f][c] = rand() % 10; } } for(f = 0 ; f < _F ; f++) { for(c = 0 ; c < _C ; c++) { b[f][c] = rand() % 10; } } for(f = 0 ; f < _F ; f++) { for(c = 0 ; c < _C ; c++) { s[f][c] = a[f][c] + b[f][c]; } } for(f = 0 ; f < _F ; f++) { for(c = 0 ; c < _C ; c++) { printf("%3ld", a[f][c]); } printf(" "); for(c = 0 ; c < _C ; c++) { printf("%3ld", b[f][c]); } printf(" "); for(c = 0 ; c < _C ; c++) { printf("%4ld", s[f][c]); } printf("\n"); } return 0; }
run
|
edit
|
history
|
help
0
es collar
gcc compiler code for delay
C_141105_PuntosTriangulo
A_141117_Primo01
PuntosTriangulo
readability!
A_141124_arrayMaxMin01
AC_setting_example
C_141106_Potencia
A_141125_MenorMayor2