How to resolve the algorithm Floyd's triangle step by step in the ZX Spectrum Basic programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Floyd's triangle step by step in the ZX Spectrum Basic programming language
Table of Contents
Problem Statement
Floyd's triangle lists the natural numbers in a right triangle aligned to the left where
The first few lines of a Floyd triangle looks like this:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Floyd's triangle step by step in the ZX Spectrum Basic programming language
Source code in the zx programming language
10 LET n=10: LET j=1: LET col=1
20 FOR r=1 TO n
30 FOR j=j TO j+r-1
40 PRINT TAB (col);j;
50 LET col=col+3
60 NEXT j
70 PRINT
80 LET col=1
90 NEXT r
You may also check:How to resolve the algorithm Weird numbers step by step in the 11l programming language
You may also check:How to resolve the algorithm Rosetta Code/Count examples step by step in the Perl programming language
You may also check:How to resolve the algorithm Time a function step by step in the Maxima programming language
You may also check:How to resolve the algorithm Sorting algorithms/Heapsort step by step in the Delphi programming language
You may also check:How to resolve the algorithm Draw a pixel step by step in the M2000 Interpreter programming language