text calculator.sol
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text calculator.sol相关的知识,希望对你有一定的参考价值。
pragma solidity ^0.4.24;
contract Operations{
uint public number = 0;
address owner;
constructor() public {
owner = msg.sender;
}
function add(uint _number) public returns (bool) {
require(msg.sender == owner);
number += _number;
return true;
}
function sub(uint _number) public returns (bool) {
require(msg.sender == owner);
if(_number <= number){
number -= _number;
return true;
}else{
return false;
}
}
function multiply(uint _number) public returns (bool) {
require(msg.sender == owner);
number *= _number;
return true;
}
function division(uint _number) public returns (bool) {
require(msg.sender == owner);
if(_number == 0){
return false;
}else{
number /= _number;
return true;
}
}
function clear() public returns (bool) {
require(msg.sender == owner);
number = 0;
return true;
}
}
以上是关于text calculator.sol的主要内容,如果未能解决你的问题,请参考以下文章
<!-- text --> 和 /* text */ 注释有啥区别?
VB中 如何复制Text1.text的字体到剪贴板? 如何剪切?
VB 加减乘除
text-decoration:[ text-decoration-line ] || [ text-decoration-style ] || [ text-decoration-color ]
.text 和 .get_text() 之间的区别
javascript或css:如何隐藏标签内的文本中的任何数字,后跟点前缀“1.text”,“2.text”...“30.text”