Dart编程实例 - 赋值操作符
void main() {
var a = 12;
var b = 3;
a+=b;
print("a+=b : ${a}");
a = 12; b = 13;
a-=b;
print("a-=b : ${a}");
a = 12; b = 13;
a*=b;
print("a*=b' : ${a}");
a = 12; b = 13;
a/=b;
print("a/=b : ${a}");
a = 12; b = 13;
a%=b;
print("a%=b : ${a}");
}
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!