Lecture 6
Control Structures II
(Repetition)
Examples
Computer
Programming
Dr. Hanaa Hamza
Code of conduct
Agend
a
• Repetition Examples
Example 1:
Display Multiplication table up to 10
Example 1: Display Multiplication table up to 10
Example 1: Display Multiplication table up to 10
Example 2:
Display multiplication table
up to a given range
Example 2: Display multiplication table up to a given range
Example 2: Display multiplication table up to a given range
Example 3:
Program to Check Whether a
Number is Prime or Not
Example 3:
Program to Check Whether a Number is Prime or Not
Example 3:
Program to Check Whether a Number is Prime or Not
Example 4:
Fibonacci Series up to n
number of terms
Example 4: Fibonacci Series up to n number of terms
Example 4: Fibonacci Series up to n number of terms
Example 5:
printin
g
patter
n of
numbe
rs
Example 5: Printing pattern of numbers
Example 5: Printing pattern of numbers
Example 6:
printing pattern of numbers II
Example 6: Printing pattern of numbers II
Example 6: Printing pattern of numbers II
Questions?

Computer_Programming_Lecture_6Control Structures2.pptx