Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
scitani matic
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <stdio.h> #define SLOUPCE 6 #define RADKY 3 int main(void) { int matA[RADKY][SLOUPCE]; int matB[RADKY][SLOUPCE]; int matC[RADKY][SLOUPCE]; unsigned int i=0; unsigned int j=0; for (i=0;i<RADKY;i++) //nacpat do matice cisla 1,2,3,4... { for (j=0;j<SLOUPCE;j++) { matA[i][j]=j+i*SLOUPCE; matB[i][j]=j+i*SLOUPCE; } } for (i=0;i<RADKY;i++) //vypise matici { for (j=0;j<SLOUPCE;j++) { printf("%d ",matA[i][j]); } printf("\n"); } for (i=0;i<RADKY;i++) //secte matice a+b { for (j=0;j<SLOUPCE;j++) { matC[i][j]=matA[i][j] + matB[i][j]; } } for (i=0;i<RADKY;i++) //vypise matici { for (j=0;j<SLOUPCE;j++) { printf("%d ",matC[i][j]); } printf("\n"); } }
run
|
edit
|
history
|
help
0
TBod
euklejduv algoritmus
array of structures
BPC UDP pr3 cv10 final
test1
hledání max, min
Pole MAX a MIN
TVector
PÅ™estupný rok
inicializace struktury