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

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Show ASCII table step by step in the Delphi 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 Delphi programming language

Source code in the delphi programming language

program Show_Ascii_table;

{$APPTYPE CONSOLE}

var
  i, j: Integer;
  k: string;

begin
  for i := 0 to 15 do
  begin
    j := 32 + i;
    while j < 128 do
    begin
      case j of
        32:
          k := 'Spc';
        127:
          k := 'Del';
      else
        k := chr(j);
      end;
      Write(j: 3, ' : ', k: 3, '   ');
      inc(j, 16);
    end;
    Writeln;
  end;
  Readln;
end.


  

You may also check:How to resolve the algorithm Address of a variable step by step in the BASIC programming language
You may also check:How to resolve the algorithm Semiprime step by step in the PHP programming language
You may also check:How to resolve the algorithm Greatest common divisor step by step in the Nial programming language
You may also check:How to resolve the algorithm File modification time step by step in the Perl programming language
You may also check:How to resolve the algorithm Stack step by step in the Liberty BASIC programming language