title: Want to see if a one digit of a 2 digit number is divisible by the other digit
body: <p>The problem I am having is how to say if(//code=Whole) I dont know how to tell the program if the number equals whole number because if its a number like 39 9 divided 3 equals a whole number if a number is not divisible it will go to the decimals which is how I am willing to solve the problem by saying if digit 1 or 2 divisible by the other digit is whole then cout&lt;&lt;Divisible</p>
  <p>I tried searching up didnt work heres my code</p>
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  int x,z,n;
  cin&gt;&gt;x;
  x%10=z;
  x/10=n;
  if(z/n==int)
  {
      cout&lt;&lt;&quot;YES&quot;;
  }
  else if(n/z==int)
  {
      cout&lt;&lt;&quot;YES&quot;
  }
  else
  {
      cout&lt;&lt;&quot;NO&quot;;
  }
  }
  </code></pre>
  <p>I dont know how to say if it equals whole So i dont know what to put there plus there might be something wrong in the program other than that.</p>