1. Home
  2. /
  3. Rpg
  4. /
  5. Factorial Calculator

Factorial Calculator - Rpg Typing CST Test

Loading…

Factorial Calculator — Rpg Code

Calculates factorial of a number.

D N               S              5I 0 INZ(5)
D F               S              10I 0 INZ(1)
D I               S              5I 0

C     *ENTRY    PLIST
C               PARM
C               FOR I = 1 TO N
C                 F = F * I
C               ENDFOR
C               WRITE F

Rpg Language Guide

RPG (Report Program Generator) is a high-level programming language primarily used for business applications, especially on IBM midrange systems like AS/400 and IBM i, for generating reports and handling data processing tasks.

Primary Use Cases

  • ▸Generating business reports
  • ▸Batch data processing
  • ▸Financial calculations
  • ▸Inventory and logistics management
  • ▸Legacy enterprise application maintenance

Notable Features

  • ▸Column-based fixed format (original RPG)
  • ▸Integrated file handling for database records
  • ▸Procedural and calculation-oriented
  • ▸Evolved into free-format RPG IV
  • ▸Strong IBM i ecosystem support

Origin & Creator

Developed in 1959 by IBM, originally for IBM 1401 systems; evolved into RPG IV on IBM i platforms.

Industrial Note

RPG powers many legacy enterprise applications in banks, manufacturing, and government systems, often running critical business processes on IBM i (AS/400) systems.

More Rpg Typing Exercises

RPG Counter and Theme ToggleRPG Fibonacci SequenceRPG Prime CheckerRPG Sum of ArrayRPG Reverse StringRPG Multiplication TableRPG Temperature ConverterRPG Simple Alarm SimulationRPG Random Walk Simulation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher