-
Notifications
You must be signed in to change notification settings - Fork 1
/
1 - SUPERIEUR 250
43 lines (43 loc) · 2.01 KB
/
1 - SUPERIEUR 250
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
IDENTIFICATION DIVISION.
PROGRAM-ID. EXERCICE_1.
AUTHOR. KERESTES
DATE-WRITTEN. JUNE 17, 2022.
******************************************************************
* *
* LE PROGRAMME RECOIS UNE LISTE DE NOMBRES ET N'AFFICHE QUE *
* LEs SUPERIERES A 250. *
* *
******************************************************************
ENVIRONMENT DIVISION.
******************************************************************
INPUT-OUTPUT SECTION.
*-----------------------------------------------------------------
FILE-CONTROL.
SELECT CHIFFRE ASSIGN TO "liste_nombre.seq"
ORGANIZATION IS SEQUENTIAL.
******************************************************************
DATA DIVISION.
******************************************************************
FILE SECTION.
*-----------------------------------------------------------------
FD CHIFFRE.
01 NOMBRE PIC 9(3).
*-----------------------------------------------------------------
WORKING-STORAGE SECTION.
*-----------------------------------------------------------------
01 WS-NUM PIC 9(3).
01 WS-EOF PIC A(1).
******************************************************************
PROCEDURE DIVISION.
******************************************************************
OPEN INPUT CHIFFRE.
*
PERFORM UNTIL WS-EOF = 'Y'
READ CHIFFRE INTO WS-NUM
AT END MOVE 'Y' TO WS-EOF
NOT AT END IF WS-NUM > 250
DISPLAY WS-NUM
END-IF
END-PERFORM.
CLOSE CHIFFRE.
STOP RUN.