Dart编程实例 - else if
void main() {
var num = 2;
if(num > 0) {
print("${num} is positive");
}
else if(num < 0) {
print("${num} is negative");
}
else {
print("${num} is neither positive nor negative");
}
}
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!