How to resolve the algorithm Loops/Downward for step by step in the REXX programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Loops/Downward for step by step in the REXX programming language

Table of Contents

Problem Statement

Write a   for   loop which writes a countdown from   10   to   0.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Loops/Downward for step by step in the REXX programming language

Source code in the rexx programming language

  do j=10  to 0  by -1
  say j
  end

  do j=10  by -1  to 0
  say j
  end

  do j=10  by -2  to 0
  say j
  j=j+1     /*this increments the  DO  index.   Do NOT program like this! */
  end

  do j=30  to 1  by -.25
  say j
  end

  

You may also check:How to resolve the algorithm Text processing/2 step by step in the Factor programming language
You may also check:How to resolve the algorithm Execute HQ9+ step by step in the FreeBASIC programming language
You may also check:How to resolve the algorithm Jensen's Device step by step in the Forth programming language
You may also check:How to resolve the algorithm Inheritance/Single step by step in the Fortran programming language
You may also check:How to resolve the algorithm Range extraction step by step in the Groovy programming language