Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream >
  3. #include <cstdlib>
  4. #include <ctime>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. setlocale(LC_ALL, "rus");
  10. srand(time(NULL));
  11. cout << "***\t Матриця \t***" << endl;
  12. const int a = 4;
  13. double array[a][a];
  14. int q, g, i, j;
  15. //int min = 0;
  16.  
  17. for (i = 0; i < a; i++) {
  18. for (j = 0; j < a; j++) {
  19. array[a][a] = rand() % 20 - 10;
  20. cout << array[a][a] << "\t";
  21. }
  22. cout << endl;
  23. }
  24. //
  25.  
  26. for (i = 0; i < a; i++) {
  27. for (j = 0; j < a; j++) {
  28. int min=0;
  29. if (min < array[i][j]) min = array[i][j];
  30. }
  31. cout << endl;
  32. }
  33.  
  34. cout<<"minimalnyy element=" << min<<endl;
  35.  
  36.  
  37. cout << endl;
  38.  
  39.  
  40. setlocale(LC_ALL,"OCP");
  41. system("pause");
  42.  
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement