How to resolve the algorithm FizzBuzz step by step in the Red programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm FizzBuzz step by step in the Red 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 Red programming language
Source code in the red programming language
Red [Title: "FizzBuzz"]
repeat i 100 [
print case [
i % 15 = 0 ["FizzBuzz"]
i % 5 = 0 ["Buzz"]
i % 3 = 0 ["Fizz"]
true [i]
]
]
You may also check:How to resolve the algorithm Babbage problem step by step in the Plain English programming language
You may also check:How to resolve the algorithm Roman numerals/Encode step by step in the Groovy programming language
You may also check:How to resolve the algorithm Sorting algorithms/Gnome sort step by step in the Erlang programming language
You may also check:How to resolve the algorithm Nested templated data step by step in the VBA programming language
You may also check:How to resolve the algorithm Loop over multiple arrays simultaneously step by step in the AWK programming language