Presentation is loading. Please wait.

Presentation is loading. Please wait.

Repetition and Loops while do while for continue break

Similar presentations


Presentation on theme: "Repetition and Loops while do while for continue break"— Presentation transcript:

1 Repetition and Loops while do while for continue break

2 Most programs involve repetition or looping.
A loop is a group of instructions the computer executes repeatedly while some loop-continuation condition remains true.

3

4

5

6 Finding factorial number

7

8

9

10 Nested loops

11

12 infinite loops (loops that do not finish executing)

13 Factors of a number

14 Finding power of a number

15 Finding fibonacci series

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31 Homework Write a program that finds whether a given integer is an Armstrong number: Such as: 153 = 1*1*1 + 5*5*5 + 3*3*3 // 153 is an Armstrong number. 12 is not equal to 1*1*1+2*2*2 // 12 is not an Armstrong number. The program will read the integer from the user and find the result Send the “my_program_e c” file to my address Until Sunday midnight


Download ppt "Repetition and Loops while do while for continue break"

Similar presentations


Ads by Google