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 N = 5;
- double a[N][N];
- int i, j, k;
- for (i = 0; i < N; ++i)
- {
- for (j = 0; j < N; ++j)
- {
- a[i][j] = cos(pow(i, 2.0) + N);
- cout << a [i][j] << " ";
- }
- cout << endl;
- }
- cout << "\n";
- k = 0;
- for (i = 0; i < N; ++i)
- {
- for (j = 0; j < N; ++j)
- {
- if (a[i][j] > 0)
- ++k;
- }
- }
- cout << "kolichestvo polozhitel'nih elementov ravno " << k;
- getch ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement