aoc-2015/jour05/test.cob

39 lines
1.1 KiB
COBOL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

IDENTIFICATION DIVISION.
PROGRAM-ID. jour-cinq-prem-part.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FILE1 ASSIGN TO "input"
ORGANIZATION LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD FILE1.
01 INPUT-FILE.
02 STR PIC A(17).
WORKING-STORAGE SECTION.
01 MY-FILE.
02 STR PIC A(17).
01 WS-STATUS PIC X VALUE 'N'.
88 EOF VALUE 'Y'.
PROCEDURE DIVISION.
main.
OPEN INPUT FILE1.
PERFORM UNTIL EOF
READ FILE1 RECORD INTO MY-FILE
AT END MOVE 'Y' TO WS-STATUS
NOT AT END DISPLAY MY-FILE
END-READ
END-PERFORM.
CLOSE FILE1.
STOP RUN.
END PROGRAM jour-cinq-prem-part.
*deuxième étape, lire car par car
*troisième étape, check si voyelle
*retenir lettre act et pred pour check mot interdit
*retenir lettre jusquà double