+ 1

How to print 6 decimals

Result = m /n; Console.WriteLine(Result);

13th Dec 2020, 9:27 AM
Esraa Hesham
Esraa Hesham - avatar
4 Respuestas
+ 2
Esraa Hesham There is 2 more format to get in decimal ------ Console.WriteLine(Result.ToString("N6")); Console.WriteLine(string.Format("{0:N6}", Result));
13th Dec 2020, 9:48 AM
A͢J
A͢J - avatar
+ 1
Esraa Hesham int m = Convert.ToInt32(Console.ReadLine()); int n = Convert.ToInt32(Console.ReadLine()); double Result = (double) m / n; Console.Write(Result.ToString("0.000000"));
13th Dec 2020, 9:40 AM
A͢J
A͢J - avatar
+ 1
I Am Groot ! Thank you so much!!
13th Dec 2020, 9:46 AM
Esraa Hesham
Esraa Hesham - avatar
+ 1
Thank you a lot ^_^ This was so helpful!!
13th Dec 2020, 9:49 AM
Esraa Hesham
Esraa Hesham - avatar