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;
}
}
}
智能合约:solidity-ifElse.sol
最新推荐文章于 2023-05-18 20:46:05 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)