智能合约:solidity-ifElse.sol
pragma solidity ^0.8.3;contract IfElse{function foo(uint x) public pure returns(uint){if(x<10){return 0;}else if(x<20){return 1;}else{return 2;}}}
·
pragma solidity ^0.8.3;
contract IfElse{
function foo(uint x) public pure returns(uint){
if(x<10){
return 0;
}else if(x<20){
return 1;
}else{
return 2;
}
}
}
更多推荐
已为社区贡献3条内容
所有评论(0)