% Example program to print a times-table

low = input('Low? '); % Get the range [low..high]
high = input('High? ');
fprintf('%5s', ' '); % Make space for row indicator
for col = low:high % Print column headings
fprintf('%5d', col);
end
fprintf('\n');
for row = low:high % Handle each row
fprintf('%5d', row); % Print row indicator
for col = low:high % Fill row
fprintf('%5d', row*col);
end
fprintf('\n');
end