Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Create your online store today with Shopify

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Disclosure: My content contains affiliate links.

43,230 questions

56,132 answers

573 users

How to use do while loop in Dart

2 Answers

0 votes
void main() {
    var n = 10; 
    
    do { 
      print(n); 
      n--; 
    } while(n > 0); 
}




/*
run:

10
9
8
7
6
5
4
3
2
1

*/

 



answered Oct 7, 2022 by avibootz
0 votes
void main() {
    var n = 1; 
    
    do { 
      print(n); 
      n++; 
    } while(n < 10); 
}




/*
run:

1
2
3
4
5
6
7
8
9

*/

 



answered Oct 7, 2022 by avibootz

Related questions

1 answer 222 views
222 views asked Oct 8, 2022 by avibootz
2 answers 377 views
2 answers 214 views
214 views asked Oct 7, 2022 by avibootz
1 answer 185 views
185 views asked Oct 8, 2022 by avibootz
3 answers 336 views
336 views asked Mar 25, 2023 by avibootz
1 answer 196 views
1 answer 177 views
177 views asked Oct 7, 2022 by avibootz
...