How to resolve the algorithm Loops/Foreach step by step in the REXX programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Loops/Foreach step by step in the REXX programming language
Table of Contents
Problem Statement
Loop through and print each element in a collection in order. Use your language's "for each" loop if it has one, otherwise iterate through the collection in order with some other loop.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Loops/Foreach step by step in the REXX programming language
Source code in the rexx programming language
days = 'zuntik montik dinstik mitvokh donershtik fraytik shabes'
do j=1 for words(days) /*loop through days of the week. */
say word(days,j) /*display the weekday to screen. */
end /*j*/
/*stick a fork in it, we're done.*/
You may also check:How to resolve the algorithm Non-transitive dice step by step in the Factor programming language
You may also check:How to resolve the algorithm Permutations step by step in the JavaScript programming language
You may also check:How to resolve the algorithm Append a record to the end of a text file step by step in the Fortran programming language
You may also check:How to resolve the algorithm Delegates step by step in the Ada programming language
You may also check:How to resolve the algorithm Dinesman's multiple-dwelling problem step by step in the Rust programming language