Factorial Calculator - Algol Typing CST Test
Loading…
Factorial Calculator — Algol Code
Calculates the factorial of a number.
begin
integer n, f, i;
n := 5;
f := 1;
for i := 1 step 1 until n do
begin
f := f * i;
end;
print(f);
endAlgol Language Guide
ALGOL (Algorithmic Language) is a family of high-level programming languages designed for scientific computations and algorithm description, known for its structured programming features and influence on modern languages like Pascal, C, and Java.
Primary Use Cases
- ▸Scientific computations
- ▸Algorithm description in publications
- ▸Academic teaching of programming and algorithms
- ▸Mathematical modeling
- ▸Compiler research and language design
Notable Features
- ▸Block-structured programming
- ▸Nested procedures and lexical scoping
- ▸Call by name and call by value parameter passing
- ▸Structured control flow: if, for, while
- ▸Formal syntax specification (BNF)
Origin & Creator
Developed in 1958-1960 by a committee of European and American computer scientists, including Friedrich L. Bauer, John Backus, and Peter Naur.
Industrial Note
ALGOL was the standard language for publishing algorithms in scientific literature for decades and shaped the syntax and structure of many subsequent languages.