Do While Loop Example Program in Dart


Example Program:

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

Source Code

//Do While loop
 /*
   * Limit 5
   * Table 2  2*1=2 2*5=10
 */
import 'dart:io';
void main() {
   var i=1,t,n;
   print('Enter the Table and Limit : ');
   t=int.parse(stdin.readLineSync());
   n=int.parse(stdin.readLineSync());
   do
   {
     print(t.toString()+'*'+i.toString()+'='+(i*t).toString());
     i++;
   }while(i<=n);
}
To download raw file Click Here

Output

Enter the Table and Limit : 
10
5
10*1=10
10*2=20
10*3=30
10*4=40
10*5=50


Learn All in Tamil © Designed & Developed By Tutor Joes