How to resolve the algorithm FizzBuzz step by step in the CLU programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm FizzBuzz step by step in the CLU 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 CLU programming language
Source code in the clu programming language
start_up = proc ()
po: stream := stream$primary_output()
for i: int in int$from_to(1, 100) do
out: string := ""
if i // 3 = 0 then out := out || "Fizz" end
if i // 5 = 0 then out := out || "Buzz" end
if string$empty(out) then out := int$unparse(i) end
stream$putl(po, out)
end
end start_up
You may also check:How to resolve the algorithm Additive primes step by step in the Erlang programming language
You may also check:How to resolve the algorithm Element-wise operations step by step in the FreeBASIC programming language
You may also check:How to resolve the algorithm Run-length encoding step by step in the Go programming language
You may also check:How to resolve the algorithm Fusc sequence step by step in the Vala programming language
You may also check:How to resolve the algorithm CUSIP step by step in the 11l programming language