title: How to print the remaining set of numbers in C++?
body: <p>Say there is a set <strong>U = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}</strong> and I created a C++ program and I, using some logic printed the numbers { <strong>1, 3, 6, 7, 9} (let's call it set A)</strong>, so the remaining numbers are <strong>{2, 4, 5, 8, 1} (let's call it set B)</strong></p>
  <p>and <strong>U = A + B</strong></p>
  <p>Is there a direct way to print out set B numbers <strong>(B = U - A)</strong>? (Without actually reversing the logic from which I printed numbers of Set A)</p>
  <p>Like if I printed even numbers, then the remaining are odd numbers and I can easily code to display odd numbers. But I am asking if there is another &quot;direct&quot; way of doing it?</p>
  <p>Similarly, if I printed all prime numbers from 1-100 then I can kind of reverse the logic and print the numbers which were NOT printed (here, which were NOT prime), but I am NOT asking for that, I am asking is there a direct way to print the remaining set of numbers?</p>
  <p>PS: I only know basic C++ and I have NOT yet started DSA (Data Structures and Algorithms) still any level answers are welcome, I will try hard to interpret it :)</p>