So while loop is theoretically same like other programming language.take an example in Python.
x =0
while x < 10:
print("Count is {0}".format(x))
x+=1
Infinite Loops
num =10
while True:
if num == 42:
break
print("Hello World")
No comments:
Post a Comment