So what is a repetition ?
Repetition means repeating a sequence of of instructions a certain number of times or until some specific result is achieved.
There are 3 repitition/looping in operation:
1.For
2.While
3.Do while
FOR :
To do a For loop you need to add 3 things :-an inilization -a conditional -an increment or decrement.
An inilization is used to inilize the program . The conditional is to put a condition of how the program is run and the increment/decrement is to tell which way the program looping.
Now I don't really know much about while so I'll just put one of the formula for this one.
So I think this one is to looping until it hit the conditional (<=10)
DO WHILE:
Do while is the kind of looping where it will keep looping until the conditional is true
So,I'll just give the formula
Well.....I think that's all for now . I hope this will help. Please tell me if I did something wrong here in the comment okay :D




No comments:
Post a Comment