Skip to content

Instantly share code, notes, and snippets.

@maymax777
Last active February 21, 2022 12:30
Show Gist options
  • Save maymax777/51039d0024ba62acebb9fa441f2c6e0b to your computer and use it in GitHub Desktop.
Save maymax777/51039d0024ba62acebb9fa441f2c6e0b to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.19;
contract MaximumMultiple {
function maxMultiple(int d, int b) public pure returns (int) {
//
int max = d > b ? d : b;
int min = d < b ? d : b;
return max - max % min;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment