While Loop Example Program in Dart


Example Program:

Here is the simple program for printing basic example of while loop in dart.

Source Code

import 'dart:io';
//While loop
void main() {
   var i=1;
   while(i<=10)
   {
      print(i);
      i=i+2;//i=i+1
   }
}
To download raw file Click Here

Output

1
3
5
7
9


Learn All in Tamil © Designed & Developed By Tutor Joes