Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5.  
  6. int main(void)
  7. {
  8. int tablica[10][10] = { 0 };
  9. int tab1[10] = { 0 };
  10. int tab2[10] = { 0 };
  11. int x, y,a,b;
  12.  
  13. printf("Podaj od ktorej liczby chcesz mnozyc:\n");
  14. printf("Wiersze \n");
  15. scanf_s("%d", &tab1[0]);
  16.  
  17. for (a = 1; a < 10; a++)
  18. {
  19. tab1[a] = tab1[0] + a;
  20.  
  21.  
  22. }
  23.  
  24.  
  25. printf("Kolumny\n");
  26. scanf_s("%d", &tab2[0]);
  27. printf("\t%d", tab2[0]);
  28. for (b = 1; b < 10; b++)
  29. {
  30. tab2[b] = tab2[0] + b;
  31.  
  32. }
  33.  
  34.  
  35. printf("\n");
  36.  
  37. for (x = 0; x < 10; x++)
  38. {
  39. printf("%d|\t", tab1[x]);
  40. for (y = 0; y < 10; y++)
  41. {
  42. tablica[x][y] = tab1[x] * tab2[y];
  43. printf("%d\t", (tablica[x][y]));
  44. }
  45. printf("\n");
  46. }
  47. system("pause");
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement