Algorithm for generating multiplication table
Answers
Answered by
0
Answer:
Below is an explanation to generate table for any number tableNum, starting from startPos till endPos.
eg tableNum = 5, startPos = 4, endPos = 8
output :
20,25,30,35,40
Explanation:
genTable(tableNum, startPos, endPos)
{
Step 1 : Set counter to startPos
Step 2 :check if counter is greater than endPos
true - End the job
false - Go to step 3
Step 3 : Multiply tableNum with counter and store/print the result
Step 4: Increase the value of counter by 1
Step 5: Go to Step 2.
}
Similar questions
Physics,
5 months ago
Computer Science,
5 months ago
Social Sciences,
10 months ago
Biology,
10 months ago
Accountancy,
1 year ago