# **👔 Booth: COBOL (1959)**

* **Creator:** CODASYL Committee (heavily inspired by Grace Hopper's FLOW-MATIC)  
* **Design Philosophy:** "Common Business-Oriented Language" — designed to mimic self-documenting, plain-English sentences so managers, analysts, and non-programmers could inspect code logic.  
* **Key Innovations:** Record structures (hierarchical records), file-handling and system abstractions, explicit separation of hardware configuration from application logic, and legendary institutional longevity.

## **🏗️ The Four Divisions**

Every COBOL program is structured into four mandatory, highly disciplined divisions:

1. **IDENTIFICATION DIVISION:** Declares the program's metadata, such as its name and author.  
2. **ENVIRONMENT DIVISION:** Specifies the physical computer hardware, input files, and output destinations.  
3. **DATA DIVISION:** Declares all variable types, array structures, and record fields using strict hierarchical levels (like 01 for records and 05 for fields).  
4. **PROCEDURE DIVISION:** Contains the actual programming logic, written as paragraphs of English-like commands (like ADD, MULTIPLY, MOVE, and DISPLAY).

## **🚀 Hello, World\!**

       IDENTIFICATION DIVISION.  
       PROGRAM-ID. HELLO-WORLD.  
         
       PROCEDURE DIVISION.  
           DISPLAY "Hello, World\!".  
           STOP RUN.

## **🎨 Showpiece: Simple Interest Calculator**

This program showcases how COBOL structures records in the DATA DIVISION and executes calculations using English verbs in the PROCEDURE DIVISION.

       IDENTIFICATION DIVISION.  
       PROGRAM-ID. INTEREST-CALC.

       ENVIRONMENT DIVISION.

       DATA DIVISION.  
       WORKING-STORAGE SECTION.  
       01 CLIENT-DATA.  
          05 CLIENT-NAME     PIC X(20) VALUE "ALAN TURING".  
          05 PRINCIPAL       PIC 9(5)V99 VALUE 1000.00.  
          05 INTEREST-RATE   PIC 9(2)V99 VALUE 05.50.  
          05 YEARS           PIC 99 VALUE 03\.  
       01 CALCULATIONS.  
          05 INTERMEDIATE    PIC 9(5)V99.  
          05 TOTAL-PAYOUT    PIC 9(5)V99.

       PROCEDURE DIVISION.  
       000-MAIN-LOGIC.  
           DISPLAY "CLIENT: " CLIENT-NAME.  
             
           \* Simulating Simple Interest Calculation:  
           COMPUTE INTERMEDIATE \= PRINCIPAL \* (INTEREST-RATE / 100).  
           MULTIPLY INTERMEDIATE BY YEARS GIVING TOTAL-PAYOUT.  
           ADD PRINCIPAL TO TOTAL-PAYOUT.  
             
           DISPLAY "INITIAL PRINCIPAL: $" PRINCIPAL.  
           DISPLAY "ACCUMULATED VALUE AFTER " YEARS " YEARS: $" TOTAL-PAYOUT.  
             
           STOP RUN.  
