Question: Write a for loop to populate multiplication Table with the multiples of base Value from 0 to 5. Ex: If base value is 2, then
Write a for loop to populate multiplication Table with the multiples of base Value from 0 to 5. Ex: If base value is 2, then multiplication Table is [0, 2, 4, 6, 8, 10]. (2 x 0 = 0, 2 x 1 = 2, 2 x 2 = 4, 2 x 3 = 6, 2 x 4 = 8, 2 x 5 = 10) function multiplication Table = Create Table (base Value) % Multiples of base Value used to populate multiplication Table multiplication Table = zeros (1, 6) % Preallocate multiplication Table with 6 elements % Write a for loop to populate multiplication Table with the % multiples of base Value from theta to 5 end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
