How to resolve the algorithm Show ASCII table step by step in the Wren programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Show ASCII table step by step in the Wren programming language

Table of Contents

Problem Statement

Show  the ASCII character set  from values   32   to   127   (decimal)   in a table format.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Show ASCII table step by step in the Wren programming language

Source code in the wren programming language

import "/fmt" for Fmt

for (i in 0...16) {
    var j = 32 + i
    while (j < 128) {
        var k = "%(String.fromByte(j))"
        if (j == 32) {
            k = "Spc"
        } else if (j == 127) {
            k = "Del"
        }
        System.write("%(Fmt.d(3, j)) : %(Fmt.s(-3, k))   ")
        j = j + 16
    }
    System.print()
}

  

You may also check:How to resolve the algorithm Conway's Game of Life step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Trigonometric functions step by step in the Erlang programming language
You may also check:How to resolve the algorithm Variable size/Get step by step in the Ol programming language
You may also check:How to resolve the algorithm Keyboard macros step by step in the HicEst programming language
You may also check:How to resolve the algorithm Strip control codes and extended characters from a string step by step in the Tcl programming language