Created
September 21, 2022 05:24
-
-
Save Shashank-In/a55a3dbe9b52f983e17296c166d3588b to your computer and use it in GitHub Desktop.
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.8.0; | |
contract Fee { | |
function caculateLowFee() public pure returns(uint){ | |
uint coins = 2; | |
uint Total_coins = 10; | |
uint fee = 15; | |
return((coins/Total_coins) * fee); | |
} | |
function caculateHighFee() public pure returns(uint){ | |
uint coins = 2; | |
uint Total_coins = 10; | |
uint fee = 15; | |
return((coins * fee) / Total_coins); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment