title: Delete last decimal value in a double
body: <p>I am making a calculator in C#.
  I save the input from the user as a double.</p>
  
  <p>I use the following code to delete the last entered number in a double withour decimals.</p>
  
  <pre><code>i = (i - (i % 10)) / 10;
  </code></pre>
  
  <p>This wil delete the last number.</p>
  
  <p>12345 wil become 1234</p>
  
  <p><br></p>
  
  <p>What I can't figuere out is how to make this happen for decimal values.</p>
  
  <p>2134.765 must become 2134.76</p>
  
  <p>my program uses a var to see if a point has been put in so I only need the math to delete the last number.</p>