How to resolve the algorithm Show ASCII table step by step in the COBOL programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Show ASCII table step by step in the COBOL 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 COBOL programming language
Source code in the cobol programming language
IDENTIFICATION DIVISION.
PROGRAM-ID. CHARSET.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CHARCODE PIC 9(3) VALUE 32.
PROCEDURE DIVISION.
MAIN-PROCEDURE.
PERFORM UNTIL CHARCODE=128
DISPLAY FUNCTION CONCATENATE(
FUNCTION CONCATENATE(
CHARCODE,
" : "
),
FUNCTION CONCATENATE(
FUNCTION CHAR(CHARCODE),
" "
)
)
WITH NO ADVANCING
ADD 1 TO CHARCODE
END-PERFORM.
END PROGRAM CHARSET.
You may also check:How to resolve the algorithm Miller–Rabin primality test step by step in the Smalltalk programming language
You may also check:How to resolve the algorithm 15 puzzle game step by step in the BBC BASIC programming language
You may also check:How to resolve the algorithm CSV to HTML translation step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Runtime evaluation step by step in the Scheme programming language
You may also check:How to resolve the algorithm Percolation/Mean cluster density step by step in the Python programming language