+ 2
How do I turn an Input into a Double? (C#)
6 ответов
+ 3
It should be something like this:
double x = Convert.ToDouble(Console.ReadLine());
+ 12
If possible, please provide a Minimal, Complete, and Verifiable code @ Code Playground so we can help you to take a look on the code. 😉
+ 2
It's working now, thank you Paul Jacobs :D
+ 2
Or alternatively
double d = Double.Parse(Console.ReadLine());
Which is shorter
+ 1
Im sorry, I was a little bit busy.... so, I imported this code from Visual Studios, i made this 1 month ago...
the code runs perfectly in there, but SoloLearn says that Im missing something, I don't know what exatly :/
+ 1
I did that but i forgot the double on the beggining... i did
d = Double.Parse(Console.ReadLine());