________________ loop is used when you know how many times to repeat a block of statements.
Answers
Answered by
4
Answer:
A "While" Loop is used to repeat a specific block of code an unknown number of times, until a condition is met.
Answered by
2
For loop is used for it like if I write loop in c++
Example
for(int i=0; i<10; i++)
{ // for some code execution )
Here int i=0 is for initialisation of an integer variable because this is from where loop starts
i<10 is condition till where it goes through while executing block statements
i++ is an incremental which means i=i+1
Thanks
Example
for(int i=0; i<10; i++)
{ // for some code execution )
Here int i=0 is for initialisation of an integer variable because this is from where loop starts
i<10 is condition till where it goes through while executing block statements
i++ is an incremental which means i=i+1
Thanks
Similar questions
English,
4 months ago
Biology,
4 months ago
Chemistry,
4 months ago
Math,
8 months ago
English,
8 months ago
Accountancy,
11 months ago
Social Sciences,
11 months ago
English,
11 months ago