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
Practice
B_141104_TresPuntosTriangulo
Lab6 v1.0 Sin,cos,tan,cot
Assignment 5
1.6 Set No. of Threads
C pattern Rhombus
date diff sample
20171116_PI
Primer avance de lista enlazadas
simple insertion sort