Question: A positive integer with N elements will be taken from the user to the A sequence of N different numbers. If the numbers are not

A positive integer with N elements will be taken from the user to the A sequence of N different numbers. If the numbers are not entered positively

will be checked and the values will be entered correctly. Two different sequences (X and Y) of these integers

The indices will be printed as ordered pairs of a binary relation according to the following correlation rule. This process

then, based on the ordered pairs in these sequences, whether the relation provides reflection and symmetry.

will be printed on the screen. The ordered pair is (Xi, Yi). No matrix and additional arrays will be used in this question. This

If the rule is violated, it will be evaluated as 0.

Rule of Relation: R: ((X, Y) | X divides 2-Y) (2-Y MOD X = 0)

Example: For the following example A sequence, the relationship that will be formed according to the above rule is

R = ((1.1) (1.2) (1.3) (1.4) (1.5) (2.2) (2.4) (3.2) (3.5) (4 2) (5,2)} Accordingly, the X and Y sequences are obtained as follows

and print the result as in the example.

A = {1, 2, 3, 4, 5}

X = {1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5}

Y = {1, 2, 3, 4, 5, 2, 4, 2, 5, 2, 2}

Conclusion: This relation does not provide reflection and symmetry properties.

function usage -Flow chart, pseudo code and variable analysis and c code will be prepared

Break, contionue, goto usage: It will not be used in solutions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!