Last active
April 4, 2022 11:52
-
-
Save MASDXI/e6edb38fad097ef31bc0c764d85ee627 to your computer and use it in GitHub Desktop.
RTLO smart contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.7.5; | |
contract Calculator { | |
function add(uint256 x, uint256 y) public pure returns (uint256) { | |
/* start function*/ | |
require(x + y >= x); | |
return /*first number*/x + y/*second number*/ | |
/* end function*/; | |
} | |
function sub(uint256 x, uint256 y) public pure returns (uint256) { | |
/* start function*/ | |
require(y <= x); | |
return /*bigger number*/x - y/*samller number*/ | |
/* end function*/; | |
} | |
function subRTL(uint256 x, uint256 y) public pure returns (uint256) { | |
/* start function*/ | |
require(y <= x); | |
return /*bigger number/*rebmun rellams*/y - x/* | |
/*end function */; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment