Validation for multiplying value at C++? <p>I have to make a test where a number has to be the <strong>multiple</strong> of 500,</p> <pre><code> do{ cout &lt;&lt; "Input Price[price&gt;0|price multiple of 500]: "; cin &gt;&gt; price; cin.sync(); cin.clear(); } while (price&lt;1 || price&gt;5000); </code></pre> <p>The code is still incomplete, I just have to add the following validation left. What do I do?</p> <p>and also what is the right term for that kind of validation? I had a hard time determining the title.</p>