How to resolve the algorithm FizzBuzz step by step in the ECL programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm FizzBuzz step by step in the ECL programming language
Table of Contents
Problem Statement
Write a program that prints the integers from 1 to 100 (inclusive).
But:
The FizzBuzz problem was presented as the lowest level of comprehension required to illustrate adequacy.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm FizzBuzz step by step in the ECL programming language
Source code in the ecl programming language
DataRec := RECORD
STRING s;
END;
DataRec MakeDataRec(UNSIGNED c) := TRANSFORM
SELF.s := MAP
(
c % 15 = 0 => 'FizzBuzz',
c % 3 = 0 => 'Fizz',
c % 5 = 0 => 'Buzz',
(STRING)c
);
END;
d := DATASET(100,MakeDataRec(COUNTER));
OUTPUT(d);
You may also check:How to resolve the algorithm Palindrome detection step by step in the X86 Assembly programming language
You may also check:How to resolve the algorithm Top rank per group step by step in the HicEst programming language
You may also check:How to resolve the algorithm Abelian sandpile model/Identity step by step in the FutureBasic programming language
You may also check:How to resolve the algorithm Terminal control/Cursor movement step by step in the ARM Assembly programming language
You may also check:How to resolve the algorithm Abelian sandpile model/Identity step by step in the ALGOL 68 programming language