Guest User

Untitled

a guest
May 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. // menu.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "header.h"
  5.  
  6.  
  7. int main()
  8. {
  9. int a[10][10],b[10][10],w[10][10],i,j,k,n,liczba,l;
  10. char z;
  11. visiting_card();
  12. menu();
  13. z = getch();
  14. switch(z)
  15. {
  16. case '0':
  17. system("cls");
  18. for (i=1; i<=n; i++)
  19. {
  20. for (j=1; j<=n; j++)
  21. {
  22. w[i][j] = a[i][j]+b[i][j];
  23. }
  24. }
  25. break;
  26. case '1':
  27. system("cls");
  28. for (i=1; i<=n; i++)
  29. {
  30. for (j=1; j<=n; j++)
  31. {
  32. w[i][j] = a[i][j]-b[i][j];
  33. }
  34. }
  35. break;
  36. case '2':
  37. system("cls");
  38. for(i=1; i<=n; i++)
  39. {
  40. for(j=1; j<=n; j++)
  41. {
  42. w[i][j] = 0;
  43. for(k=1; k<=n; k++)
  44. {
  45. w[i][j] = w[i][j] + (a[i][k] * b[k][j]);
  46. }
  47. }
  48. case '3':
  49. system("cls");
  50. for (i=1; i<=n; i++)
  51. {
  52. for (j=1; j<=n; j++)
  53. {
  54. b[i][j] = a[j][i];
  55. }
  56. }
  57. case '4':
  58. system("cls");
  59. for (i=1; i<=n; i++)
  60. {
  61. for (j=1; j<=n; j++)
  62. {
  63. w[i][j] = liczba * a[i][j];
  64. }
  65. }
  66. }
  67. }}
Add Comment
Please, Sign In to add comment