I have a smart contract with 0.15 Ether = 1 Token
So when user send 0.15 Ether it's fine he receive 1 Token, but if he sent 1 Ether normally should receive 6.66 Token, but the contract sent only 6 Tokens ?
Same case with any decimal number AA.BC it send alwayse A and ignore any number after commas.
USED FUNCTION:
uint amount = msg.value;
uint tokentosend = amount / price;
tokenReward.transfer(msg.sender, tokentosend);
Can you please help ?