Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- int tablica[10][10] = { 0 };
- int tab1[10] = { 0 };
- int tab2[10] = { 0 };
- int x, y,a,b;
- printf("Podaj od ktorej liczby chcesz mnozyc:\n");
- printf("Wiersze \n");
- scanf_s("%d", &tab1[0]);
- for (a = 1; a < 10; a++)
- {
- tab1[a] = tab1[0] + a;
- }
- printf("Kolumny\n");
- scanf_s("%d", &tab2[0]);
- printf("\t%d", tab2[0]);
- for (b = 1; b < 10; b++)
- {
- tab2[b] = tab2[0] + b;
- }
- printf("\n");
- for (x = 0; x < 10; x++)
- {
- printf("%d|\t", tab1[x]);
- for (y = 0; y < 10; y++)
- {
- tablica[x][y] = tab1[x] * tab2[y];
- printf("%d\t", (tablica[x][y]));
- }
- printf("\n");
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement