Q:

Write a script that will print the following multiplication table: 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25

0

 Write a script that will print the following multiplication table:

2 4 

3 6 9 

4 8 12 16 

5 10 15 20 25 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch5Ex16.m

% Prints a multiplication table

rows = 5;

for i = 1:rows

 for j = 1:i

 fprintf('%d ', i*j)

 end

 fprintf('\n')

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now