Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PrecisionTester
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { double xcord = 1343444155.8478527; //double xcord = 1144155.8478527; double div1 = 211.66666666666666666666666666667; double res1 = xcord / div1 * 100; int precision = 4; for (int i = 0; i < 9; i++) { double div2 = Math.Round (div1, precision); double res2 = xcord / div2 * 100; Console.WriteLine("precision = " + precision); Console.WriteLine(res1); Console.WriteLine(res2); Console.WriteLine("diff = " + (res1 - res2)); Console.WriteLine("------------"); precision = precision + 1; } } } }
run
|
edit
|
history
|
help
0
Demo
For - box
числата от 1 до 20
BTC sell estimator
Math 11.0 Finished fracOp
OneDrive Direct Download Generator
Calculadora
Program A
C# constructor in inheritance
sdfrgthyujyhtgrf