title: How to find out if a number ends in .5 or .0
body: <p>I was just wondering if you guys could help me out with a problem?.</p>
  
  <pre><code>double num = 2.0
  
  if(num%1 != 0)
  {
     System.out.println("hi");
  
  
  }
  else if(num%.5 != 0)
  {
     System.out.println("hi there");
  
  
  }
  </code></pre>
  
  <p>basically i want to make sure a number the user enters ends with .0 or .5.....but i am having trouble figuring it out. The above "solution" is what i came up with but it doesnt seem to work. Any pointers?, im relatively new to programming by the way so any help would be greatly apprecaited.</p>