Assignment Operators Example Program in Dart


Example Program:

Here is the simple program for printing basic example of assignment operators in dart.

Source Code

void main() {
   var a=40;
   print('A value : ${a}');
   a+=10; //a=a+10
   print('A value : ${a}');
   a-=10;
   print('A value : ${a}');
   a*=2;
   print('A value : ${a}');
   double c=80;
   c/=8;
   print('A value : ${c}');
   a=123;
   a%=10;//a=a%10
   print('A value : ${a}');
}
To download raw file Click Here

Output

A value : 40
A value : 50
A value : 40
A value : 80
A value : 10.0
A value : 3


Learn All in Tamil © Designed & Developed By Tutor Joes