+ 2

How do I turn an Input into a Double? (C#)

https://code.sololearn.com/cXEPte2dptSg/#cs

4th Jan 2018, 6:03 PM
Daniel Sá
Daniel Sá - avatar
6 ответов
+ 3
It should be something like this:  double x = Convert.ToDouble(Console.ReadLine());
4th Jan 2018, 5:37 PM
Paul
Paul - avatar
+ 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. 😉
4th Jan 2018, 3:54 PM
Zephyr Koo
Zephyr Koo - avatar
+ 2
It's working now, thank you Paul Jacobs :D
4th Jan 2018, 6:07 PM
Daniel Sá
Daniel Sá - avatar
+ 2
Or alternatively double d = Double.Parse(Console.ReadLine()); Which is shorter
6th Jan 2018, 9:11 PM
An Nahri
An Nahri - avatar
+ 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 :/
4th Jan 2018, 6:00 PM
Daniel Sá
Daniel Sá - avatar
+ 1
I did that but i forgot the double on the beggining... i did d = Double.Parse(Console.ReadLine());
7th Jan 2018, 4:39 AM
Daniel Sá
Daniel Sá - avatar