Question 1 - Consider the set X = {x ∈ Z: 1 ≤ x ≤ 32}. Implement a program in C that performs the following statements.
Create three integer vectors of size 12: vector0 [12], vector1 [12] and vector2 [12]. Store in the vector0 the elements pertaining to X that leave rest 0 when divided by 3. Store in the vector1 the elements pertaining to X that leave rest 1 when divided by 3. Store in the vector2 the elements pertaining to X that leave rest 2 when divided by 3. Print the elements contained in vector0. Print the elements contained in vector1. Print the elements contained in vector2.
Can anyone help me with this code?
This afternoon a friend asked me for help in resolving an issue in college. I like to program, but I have already finished high school for many years and I do not remember how to solve sets anymore. The only thing I remember is for my teacher to write vectors on the blackboard or draw polka dots to see if there was an intersection between two or more sets.