Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <conio.h>
- using namespace std;
- int main ()
- {
- int i, j, max;
- int N = 4;
- double a[N][N];
- for (i = 0; i < N; ++i)
- {
- for (j = 0; j < N; ++j)
- {
- a[i][j] = rand() % 10;
- cout << a[i][j] << " ";
- }
- cout << endl;
- }
- max = a[0][0];
- for (i = 0; i < N; ++i)
- {
- for (j = 0; j < N; ++j)
- {
- if ((j >= i) && (a[i][j] > max))
- max = a[i][j];
- }
- }
- cout << endl;
- cout << "maximal'noe znachenije ravno " << max;
- getch ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement