fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int fullPrice = 100;
  8. float discount = 0.1F;
  9. double finalPrice = (fullPrice * (1-discount));
  10. Console.WriteLine("The discounted price is ${0} (int:{1}).", finalPrice, (int)finalPrice);
  11. }
  12. }
Success #stdin #stdout 0.04s 24168KB
stdin
Standard input is empty
stdout
The discounted price is $89.9999998509884 (int:89).