You're performing arithmetic on two integers, so the result is an integer. You lose the fractional part of the result before it's stored in foo
.
You should convert one of the values to a double
first:
double foo = 120d / 175;
You can do this with decimal
s too, if that's what you're actually trying to use:
decimal foo = 120m / 175;
Once you've properly captured the decimal value from the first equation, this part should work fine:
decimal bar = foo * 100;