Program Segitiga Bahasa COBOL
Lisitng Program untuk progra segitiga pada bahasa COBOL
IDENTIFICATION DIVISION.
IDENTIFICATION DIVISION.
PROGRAM-ID. LOOPING.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INPUT-AREA.
02 I PIC 9.
02 J PIC 9.
02 NILAI PIC 9 VALUE 1.
PROCEDURE DIVISION.
MULAI.
PERFORM CETAK VARYING I FROM 6 BY -1 UNTIL I < NILAI
AFTER J FROM 1 BY 1 UNTIL J > I.
SELESAI.
STOP RUN.
CETAK.
DISPLAY (, ) J.
IF I = J DISPLAY SPACE.
Komentar
Posting Komentar