Data update
This commit is contained in:
parent
157b70a810
commit
8e4e15fa56
78 changed files with 2016 additions and 222 deletions
|
|
@ -1,7 +1,11 @@
|
|||
# procedure to print a Floyd's Triangle with n lines #
|
||||
# procedure to print a Floyd's Triangle with n lines #
|
||||
PROC floyds triangle = ( INT n )VOID:
|
||||
BEGIN
|
||||
|
||||
# the triangle should be left aligned with the individual numbers #
|
||||
# right-aligned with only one space before the number in the final #
|
||||
# row #
|
||||
|
||||
# calculate the number of the highest number that will be printed #
|
||||
# ( the sum of the integers 1, 2, ... n ) #
|
||||
INT max number = ( n * ( n + 1 ) ) OVER 2;
|
||||
|
|
@ -24,10 +28,6 @@ BEGIN
|
|||
|
||||
END; # floyds triangle #
|
||||
|
||||
main: (
|
||||
|
||||
floyds triangle( 5 );
|
||||
print( ( newline ) );
|
||||
floyds triangle( 14 )
|
||||
|
||||
)
|
||||
floyds triangle( 5 );
|
||||
print( ( newline ) );
|
||||
floyds triangle( 14 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue