How to resolve the algorithm Loops/While step by step in the DWScript programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Loops/While step by step in the DWScript programming language
Table of Contents
Problem Statement
Start an integer value at 1024. Loop while it is greater than zero. Print the value (with a newline) and divide it by two each time through the loop.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Loops/While step by step in the DWScript programming language
Source code in the dwscript programming language
var i := 1024;
while i > 0 do begin
PrintLn(i);
i := i div 2;
end;
You may also check:How to resolve the algorithm K-means++ clustering step by step in the Julia programming language
You may also check:How to resolve the algorithm Hickerson series of almost integers step by step in the jq programming language
You may also check:How to resolve the algorithm Fermat numbers step by step in the Raku programming language
You may also check:How to resolve the algorithm Sorting algorithms/Bead sort step by step in the Wren programming language
You may also check:How to resolve the algorithm First class environments step by step in the Erlang programming language