SHARE
TWEET

Untitled

a guest Feb 19th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <conio.h>
  2.  
  3. #include <clocale>
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10.  
  11. {
  12.  
  13. int a[4][4];
  14.  
  15. int b[4][4];
  16.  
  17. for (int i = 0; i < 4; ++i)
  18.  
  19. {
  20.  
  21. for (int j = 0; j < 4; ++j)
  22.  
  23. {
  24.  
  25. cin >> a[i][j];
  26.  
  27. }
  28.  
  29. }
  30.  
  31. printf("\n matrix:\n");
  32.  
  33. for (int i = 0; i<4; i++)
  34.  
  35. {
  36.  
  37. for (int j = 0; j<4; j++)
  38.  
  39. printf(" a[%d][%d]=%d ", i, j, a[i][j]);
  40.  
  41. printf("\n");
  42.  
  43. }
  44.  
  45. for (int i = 0; i<4; i++)
  46.  
  47. {
  48.  
  49. for (int j = 0; j<4; j++)
  50.  
  51. b[i + 1][j] = a[i + 1][j] * a[0][0] - a[0][j] * a[i + 1][0];
  52.  
  53. }
  54.  
  55. printf("\n");
  56.  
  57. printf("New matrix:\n");
  58.  
  59. for (int i = 0; i<4; i++)
  60.  
  61. {
  62.  
  63. for (int j = 0; j<4; j++)
  64.  
  65. {
  66.  
  67. b[0][j] = a[0][j];
  68.  
  69. printf(" b[%d][%d]=%d ", i, j, b[i][j]);
  70.  
  71. }
  72.  
  73. printf("\n");
  74.  
  75. }
  76.  
  77. system("pause");
  78.  
  79. return 0;
  80.  
  81. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top