Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- { int a,b,c,d,e,f;
- printf("DODAWANIE MACIERZY\n\n");
- printf("Podaj liczbe wierszy macierzy:");
- scanf("%d",&a);
- printf("Podaj liczbe kolumn macierzy:");
- scanf("%d",&b);
- int tab[a][b];
- printf("Wpisz element pierwszej macierzy\n");
- for(c=0;c<a;c++){
- for(d=0;d<b;d++)
- {printf("Podaj element:"); scanf("%d",&tab[c][d]);}
- }
- printf("Macierz:\n");
- for(c=0;c<a;c++){printf("\n");
- for(d=0;d<b;d++)
- {printf("%d",tab[c][d]);}
- }
- printf("\nWpisz element drugiej macierzy\n");
- for(e=0;e<a;e++){
- for(f=0;f<b;f++)
- {printf("Podaj element:"); scanf("%d",&tab[e][f]);}
- }
- printf("Macierz:\n");
- for(e=0;e<a;e++){printf("\n");
- for(f=0;f<b;f++)
- {printf("%d",tab[e][f]);}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement