0
What’s wrong here..?
TrYING TO GET A DOUBLE INPUT AND PRINT IT. THE RESULT IS VERY STRANGE...NO MATTER WHAT THE INPUT IS, THE OUTPUT IS 55 OR 56 OR 57...STRANGE static void Main(string[] args) { Console.Write("x1="); double xone= Convert.ToDouble(Console.Read()); Console.WriteLine (xone); }
2 Antworten
+ 4
double xone = Convert.ToDouble(Console.ReadLine());
Use ReadLine() rather than Read()
P.S. Why you write some text above in ALL CAPS?
+ 1
My ipad keyboard malfunction.
Thank you for the advice.
(Now from my android cell :-))