首页 > 建站教程 > dart >  Dart编程实例 - 赋值操作符正文

Dart编程实例 - 赋值操作符

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}");

}