Skip to content

Instantly share code, notes, and snippets.

@Shashank-In
Created September 21, 2022 05:24
Show Gist options
  • Save Shashank-In/a55a3dbe9b52f983e17296c166d3588b to your computer and use it in GitHub Desktop.
Save Shashank-In/a55a3dbe9b52f983e17296c166d3588b to your computer and use it in GitHub Desktop.
// 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