VB中Loop While和Loop Until区别
问题描述:
VB中Loop While和Loop Until区别
(A)
a = 5: b = 8
Do
Print "*"
a = a + 1
Loop While a
(B)
a = 5: b = 8
Do
Print "*"
a = a + 1
Loop Until a
比较A和B循环程序段输出“*”的个数
答
Loop While [条件]
Loop Until [条件]
两者作用相反:前者是当条件成立时继续循环,后者是当条件成立时退出循环