0

How to print complete number as a point value

hello all i tried to print double number which is double a =2.0 when i print a it displays only 2 not 2.0 so how to print complete number to point. value

8th Mar 2017, 3:10 PM
Amit Singh Rawat
Amit Singh Rawat - avatar
2 Answers
0
Console.WriteLine("{0:N1}", a);
8th Mar 2017, 7:14 PM
AtoMX
AtoMX - avatar
0
I guess you are unknowingly converting it to int in your later program. paste your code link
8th Mar 2017, 3:16 PM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar