fork(8) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. //http://es.stackoverflow.com/q/20660/127
  8. decimal _total = 650;
  9. decimal _subTotal = Math.Truncate(_total * 10000 /(100+18)) / 100;
  10.  
  11. string resultado = _subTotal.ToString("N2");
  12. Console.WriteLine(resultado);
  13. }
  14. }
Success #stdin #stdout 0s 29664KB
stdin
Standard input is empty
stdout
550.84