So I'm going to be creating an app using realmdb - realm does not support decimal data types as of yet so I have been looking for an equivalent. If you could imagine object 1 returns 50, object 2 returns 50 & object 3 returns 12 = 112 but after 30% it should return £78.40 - Right now its returning £78.4
Below is my current code.
Console.WriteLine("Object Costs");
float ObjectOne = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Object 2 Costs");
float ObjectTwo = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Object 3 Costs");
float ObjectThree = Convert.ToInt32(Console.ReadLine());
float Total = ObjectOne + ObjectTwo + ObjectThree;
Console.WriteLine("Total: " + NewLine + "£" + Total);
Console.WriteLine("DISCOUNTED - 30% OFF!!!");
Console.WriteLine(NewLine + "Final Total: " + "£" + (Total - Math.Round((Total / 100 * 30), 2, MidpointRounding.AwayFromZero)));