Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream >
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- srand(time(NULL));
- cout << "***\t Матриця \t***" << endl;
- const int a = 4;
- double array[a][a];
- int q, g, i, j;
- //int min = 0;
- for (i = 0; i < a; i++) {
- for (j = 0; j < a; j++) {
- array[a][a] = rand() % 20 - 10;
- cout << array[a][a] << "\t";
- }
- cout << endl;
- }
- //
- for (i = 0; i < a; i++) {
- for (j = 0; j < a; j++) {
- int min=0;
- if (min < array[i][j]) min = array[i][j];
- }
- cout << endl;
- }
- cout<<"minimalnyy element=" << min<<endl;
- cout << endl;
- setlocale(LC_ALL,"OCP");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement