How to resolve the algorithm Multiplication tables step by step in the PARI/GP programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Multiplication tables step by step in the PARI/GP 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 PARI/GP programming language

Source code in the pari/gp programming language

for(y=1,12,printf("%2Ps| ",y);for(x=1,12,print1(if(y>x,"",x*y)"\t"));print)

  

You may also check:How to resolve the algorithm Hello world/Line printer step by step in the C++ programming language
You may also check:How to resolve the algorithm Tau function step by step in the Wren programming language
You may also check:How to resolve the algorithm Idoneal numbers step by step in the Perl programming language
You may also check:How to resolve the algorithm Sequence of primorial primes step by step in the Sidef programming language
You may also check:How to resolve the algorithm Flipping bits game step by step in the Raku programming language