-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexm18.cbl
More file actions
45 lines (39 loc) · 1.99 KB
/
exm18.cbl
File metadata and controls
45 lines (39 loc) · 1.99 KB
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
44
45
*****************************************************************
* *
* This software have been developed under GNU GPL v3 License. *
* That means, no closed distribution of this software is *
* allowed. *
* *
* Please refer to the License text here: *
* https://www.gnu.org/licenses/gpl-3.0.txt *
* *
* For any comment, suggestion or similar, you can reach me via *
* mail on "doscar.sole@gmail.com" *
* *
*****************************************************************
ID DIVISION.
PROGRAM-ID. EXM18.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VARIABLES.
02 INTERRUPTOR-1 PIC 9(02) VALUE 2.
88 INT-CINCO VALUE 5.
88 INT-1-CIFRA VALUE 0 THRU 9.
88 INT-2-CIFRA VALUE 10 THRU 99.
88 INT-PAR VALUE 0, 2, 4, 6, 8, 10.
88 INT-IMPAR VALUE 1 3 5 7 9.
88 INT-PROHIBIDO VALUE 11 THRU 80.
PROCEDURE DIVISION.
MAINLINE.
DISPLAY 'INICIO DEL PROGRAMA'.
DISPLAY 'VALOR INCIAL: ' INTERRUPTOR-1.
SET INT-CINCO TO TRUE.
IF INTERRUPTOR-1 = 05
DISPLAY 'ES CORRECTO'
ELSE
DISPLAY 'NO ES CORRECTO. FORZAMOS EL VALOR'
SET INT-CINCO TO TRUE
END-IF.
IF INT-CINCO THEN
DISPLAY 'AHORA SI'
END-IF.