Dart编程实例 - Break 语句
void main() {
var i = 1;
while(i<=10) {
if (i % 5 == 0) {
print("The first multiple of 5 between 1 and 10 is : ${i}");
break ;
//exit the loop if the first multiple is found
}
i++;
}
}
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!