Loop without initialization ? If yes give a program
Answers
Answered by
1
Answer:
Yes. A 'for' loop can be written without initialization. A 'for' statement usually goes like: for. We can leave out any or all three of them at a time.
Answered by
1
Yes, a Loop without initialization is possible.
Here we go:
For a in range(5):
print(a*'*')
The output will be something like:
*
**
***
****
Note: I have run this program using Python.
Similar questions