“Dart saat loop” Kode Jawaban

Loop di Dart

for (int i = 0; i < 3; i++) {
	print(i);
}
Nervous Nightingale

Dart saat

void main() { 
   var num = 5; 
   var factorial = 1; 
   
   while(num >=1) { 
      factorial = factorial * num; 
      num--; 
   } 
   print("The factorial  is ${factorial}"); 
}
jaturon

loop panah

void main() { 
   var num = 5; 
   var factorial = 1; 
   
   for( var i = num ; i >= 1; i-- ) { 
      factorial *= i ; 
   } 
   print(factorial); 
}
Scary Sandpiper

Dart saat loop

while (expression) {
   Statement(s) to be executed if expression is true  
}
Yellowed Yacare

Jawaban yang mirip dengan “Dart saat loop”

Pertanyaan yang mirip dengan “Dart saat loop”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya