Replies: 1 comment 1 reply
-
@ejmorian Yes, to deal with decimals we multiply the division result with here is an example; function divide() external pure returns (uint256) {
return ((7 / 2) * 1e18);
} it will return this This way we deal with decimals in solidity. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm at the FundMe contract from the course and for some reason I find it really challenging to deal with numbers that cannot have a decimal because it always rounds up to nearest integer. I suppose this becomes easier over time?
Beta Was this translation helpful? Give feedback.
All reactions