contract test {
function calculatePrice(uint a, uint b) public pure returns (uint) {
return (a * (b / 100));
}
function calculatePrice2() public pure returns (uint) {
return (80 * (60 / 100));
}
}
So, the above two functions even though completely same give different answers. for the first function if you pass a=80 and b=60 answer is zero but if you call the second function the answer is 48.
Why? the code is exactly the same except the first function is dynamic