C# decimal places with integer operators
- by user294982
So I have this code:
p.Value = 1;
decimal avg = p.Value * 100 / 10000;
string prntout = p.Key + " : " + avg.ToString();
Console.WriteLine(prntout);
But the program prints out 0, instead of 0.01. p.Value is an int. How do I fix that?