0

so I have the following problem I'm trying to output 2 numbers after the decimal comma but it doesn't output it with 2 numbers only when I have zero or more than one zero at the end of the number.

Console.WriteLine(Math.Round(s * 0.07, 2));

here's how I did it.

Stormcho
  • 19
  • 6

1 Answers1

0

You might want:

Console.WriteLine($"{s:N2}");
Cory Nelson
  • 29,236
  • 5
  • 72
  • 110