Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Decimal Test2
//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) { //Your code goes here Console.WriteLine("Hello, world!"); double a = 50.05; double b = 49.5; } public static int Tens(int num) { if (num==1){ return 10; } else return Tens(num-1)*10; } public static void A(string a_str, string b_str) { string a_str = a.ToString(); string b_str = b.ToString(); int a_zeroes; if (a/Math.Floor(a)!=1){ a_zeroes = a_str.Substring(a_str.IndexOf(",")+1).Length; } else a_zeroes=0; int b_zeroes; if (b/Math.Floor(b)!=1) { b_zeroes = b_str.Substring(b_str.IndexOf(",")+1).Length; } else b_zeroes=0; int zeroes = Math.Max(a_zeroes,b_zeroes); int a_int = Convert.ToInt32(a*Tens(zeroes)); int b_int = Convert.ToInt32(b*Tens(zeroes)); Console.WriteLine(a_int + " " + b_int); //*****TestCode //Console.Write(zeroes); //*****EndTestCode } } }
run
|
edit
|
history
|
help
0
Enumerable Range
Katakana Quiz
FileNameCharCheck
General.cs
Func Delegate
asdfrgyjukiuytre sdcd
ASXs
gass
up casting down casting
test