How to resolve the algorithm Multiplication tables step by step in the 11l programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Multiplication tables step by step in the 11l programming language

Table of Contents

Problem Statement

Produce a formatted   12×12   multiplication table of the kind memorized by rote when in primary (or elementary) school.

Only print the top half triangle of products.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Multiplication tables step by step in the 11l programming language

Source code in the 11l programming language

V n = 12
L(j) 1..n
   print(‘#3’.format(j), end' ‘ ’)
print(‘│’)
L 1..n
   print(‘────’, end' ‘’)
print(‘┼───’)

L(i) 1..n
   L(j) 1..n
      print(I j < i {‘    ’} E ‘#3 ’.format(i * j), end' ‘’)
   print(‘│ ’i)

  

You may also check:How to resolve the algorithm Read entire file step by step in the REXX programming language
You may also check:How to resolve the algorithm Multi-dimensional array step by step in the Python programming language
You may also check:How to resolve the algorithm Sorting algorithms/Permutation sort step by step in the Tcl programming language
You may also check:How to resolve the algorithm Binary search step by step in the XPL0 programming language
You may also check:How to resolve the algorithm Loops/With multiple ranges step by step in the Common Lisp programming language