Draw the flowchart and write algorithms to print the table between 2 to 10
Answers
Algorithm to print the tables:
Step 1: Input a number for which the multiplication table is to be printed.
Step 2: assign the end value where end=10
Step 3: Repeat from i=1 to end
Step 4: Display the table values in the given output format. (num*i = num*i)
Flow chart to print the tables:
start
↓
read num
↓
assign, end=10 and i=1
↓
condition [i<=end] ---------(true)-----> print num*i
↓ ↓
↓ (false) i = i+1
↓ ↓
exit loop <----------------------------------------
↓
end
Above algorithm and flowchart will output:
input: 5
output:
5*1 = 5
5*2 =10
5*3 =15
5*4 = 20
5*5 = 25
5*6 = 30
5*7 = 35
5*8 = 40
5*9 = 45
5*10 = 50