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 = 3;
- double a[N][2 * N], b[N];
- int i, j, k;
- double x;
- cout << "x = ";
- cin >> x;
- for (i = 0; i < N; ++i)
- {
- for (j = 0; j < 2 * N; ++j)
- {
- a[i][j] = rand() % 10;
- cout << a[i][j] << " ";
- }
- cout << endl;
- }
- cout << "\n";
- for (k = 0; k < N; ++k)
- {
- for (i = 0; i < N; ++i)
- {
- b[k] = 1;
- for (j = 0; j < 2 * N; ++j)
- {
- a[i][j] = rand() % 10;
- if (a[i][j] > x)
- b[k] = 0;
- }
- }
- cout << b[k] << " ";
- }
- getch ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement