void main() {
var a=3,b=2;
int c=6,d=5,e=3;
print("Welcome in DART assignment operator !");
print("Value of b assign to a =${a=b}");
print("Here two operation perform, (Addition and assignment) value is ${a+=b}"); // Here a value is 2 by above operation.
print("Here two operation perform, (Subtraction and assignment) value is ${a-=b}"); // Here a value is 4 by above operation.
print("Here two operation perform, (Multiplication and assignment) value is ${a*=b}"); //here a value is 2 by above operation.
print("Here two operation perform, (Division and assignment) value is ${a~/=b}"); // here a value is 4 by above operation.
print("Here two operation perform, (Division and assignment) value is ${a/=b}"); // here a value is 2 by above operation.
print("Here two operation perform, (Reminder plus assignment) value is ${a%=b}"); // here a value is 2 by above operation.
print(" value of (c~/d) is ${c~/=d} or if not use negation value of (a/=b) is ${a/=b}");
print("Here two operation perform, (Leftshift plus assignment) value is ${e<<=b}"); // here a value is 2 by above operation.
print("Here two operation perform, (Rightshift plus assignment) value is ${e<<=b}"); // here e value is 12 by above operation.
}
|