Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- int A[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- int i, j;
- int A2[10] = { 1,2,3,4,5,6,7,8,9,10 };
- cout << "Df(R1) = ";//Область определения
- for (i = 0; i < 10; i++)
- {
- for (j = 0; j < 10; j++)
- {
- if (A[i] % 3 == A2[j] % 3)
- cout << A[i] << " ";
- }
- }
- cout << endl;
- cout << "Rf(R1) = ";//Множество значений
- for (i = 0; i < 10; i++)
- {
- for (j = 0; j < 10; j++)
- {
- if (A[i] % 3 == A2[j] % 3)
- cout << A2[j] << " ";
- }
- }
- cout << endl;
- cout << "Df(R2) = ";//Область определения
- for (i = 0; i < 10; i++)
- {
- for (j = 0; j < 10; j++)
- {
- if (A[i] == 2 * A2[j])
- cout << A[i] << " ";
- }
- }
- cout << endl;
- cout << "Rf(R2) = ";//Множество значений
- for (i = 0; i < 10; i++)
- {
- for (j = 0; j < 10; j++)
- {
- if (A[i] == 2 * A2[j])
- cout << A2[j] << " ";
- }
- }
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement