Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int A[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  9. int i, j;
  10. int A2[10] = { 1,2,3,4,5,6,7,8,9,10 };
  11. cout << "Df(R1) = ";//Область определения
  12. for (i = 0; i < 10; i++)
  13. {
  14. for (j = 0; j < 10; j++)
  15. {
  16. if (A[i] % 3 == A2[j] % 3)
  17. cout << A[i] << " ";
  18. }
  19. }
  20. cout << endl;
  21. cout << "Rf(R1) = ";//Множество значений
  22. for (i = 0; i < 10; i++)
  23. {
  24. for (j = 0; j < 10; j++)
  25. {
  26. if (A[i] % 3 == A2[j] % 3)
  27. cout << A2[j] << " ";
  28. }
  29. }
  30. cout << endl;
  31. cout << "Df(R2) = ";//Область определения
  32. for (i = 0; i < 10; i++)
  33. {
  34. for (j = 0; j < 10; j++)
  35. {
  36. if (A[i] == 2 * A2[j])
  37. cout << A[i] << " ";
  38. }
  39. }
  40. cout << endl;
  41. cout << "Rf(R2) = ";//Множество значений
  42. for (i = 0; i < 10; i++)
  43. {
  44. for (j = 0; j < 10; j++)
  45. {
  46. if (A[i] == 2 * A2[j])
  47. cout << A2[j] << " ";
  48. }
  49. }
  50. cout << endl;
  51. system("pause");
  52. return 0;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement