How to resolve the algorithm Count in octal step by step in the NetRexx programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Count in octal step by step in the NetRexx programming language

Table of Contents

Problem Statement

Produce a sequential count in octal,   starting at zero,   and using an increment of a one for each consecutive number. Each number should appear on a single line,   and the program should count until terminated,   or until the maximum value of the numeric type in use is reached.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Count in octal step by step in the NetRexx programming language

Source code in the netrexx programming language

/* NetRexx */
options replace format comments java crossref symbols binary

import java.math.BigInteger

-- allow an option to change the output radix.
parse arg radix .
if radix.length() == 0 then radix = 8
k_ = BigInteger
k_ = BigInteger.ZERO

loop forever
  say k_.toString(int radix)
  k_ = k_.add(BigInteger.ONE)
  end

  

You may also check:How to resolve the algorithm Apply a digital filter (direct form II transposed) step by step in the Nim programming language
You may also check:How to resolve the algorithm Split a character string based on change of character step by step in the XPL0 programming language
You may also check:How to resolve the algorithm RSA code step by step in the Common Lisp programming language
You may also check:How to resolve the algorithm Latin Squares in reduced form step by step in the Julia programming language
You may also check:How to resolve the algorithm Sorting algorithms/Strand sort step by step in the OCaml programming language