1. Home
  2. /
  3. Pli
  4. /
  5. PL/I Prime Checker

PL/I Prime Checker - Pli Typing CST Test

Loading…

PL/I Prime Checker — Pli Code

Checks if numbers are prime.

DECLARE nums FIXED BINARY(31) DIM(3) INIT(7,10,13);
DECLARE n,i FIXED BINARY(31);
DECLARE isPrime BIT(1);

DO n = 1 TO 3;
	isPrime = '1'B;
	DO i = 2 TO nums(n)-1;
		IF nums(n) MOD i = 0 THEN isPrime = '0'B;
	END;
	IF isPrime = '1'B THEN PUT SKIP LIST(nums(n), 'is Prime')
	ELSE PUT SKIP LIST(nums(n), 'is Not Prime');
END;

Pli Language Guide

PLI (Programming Language One) is a procedural, compiled language designed for business and systems programming, particularly for large-scale data processing and legacy IBM mainframe environments.

Primary Use Cases

  • ▸Large-scale batch processing
  • ▸Business and financial systems
  • ▸Mainframe application maintenance
  • ▸Data processing for enterprises
  • ▸Legacy system integration and updates

Notable Features

  • ▸Structured programming constructs
  • ▸Strong support for record and array data types
  • ▸Compiled for IBM mainframes
  • ▸Integrated input/output for batch processing
  • ▸Efficient memory and file handling

Origin & Creator

Developed by IBM in the 1960s, primarily as a high-level language for business and systems applications on mainframe computers.

Industrial Note

PLI remains in use in legacy IBM mainframe environments for maintaining mission-critical financial and administrative systems.

More Pli Typing Exercises

PL/I Counter and Theme TogglePL/I Random Number GeneratorPL/I Todo ListPL/I Dice RollerPL/I Countdown TimerPL/I Temperature ConverterPL/I Shopping CartPL/I Name GreetingPL/I Stopwatch

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher