-
Notifications
You must be signed in to change notification settings - Fork 0
/
in.cbl
61 lines (44 loc) · 1.06 KB
/
in.cbl
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
IDENTIFICATION DIVISION.
PROGRAM-ID. MEUPROGRAMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 conta_carro PIC 9(4) VALUE 10.
01 mediaCarros PIC 9(5).
01 primeira_struct .
05 valor_struct_1 PIC 9(5).
01 contador PIC 9(5) VALUE 0.
01 valorInicial PIC 9(5)V99999 VALUE 12.5.
01 segunda_struct .
05 cinco_da_struct PIC 9(5).
05 cinco_2_da_struct PIC 9(5).
05 cinco_3_da_struct PIC 9(5)V99999.
01 somaTotal PIC A(6).
01 mediaAritmetica PIC X(7).
PROCEDURE DIVISION.
MAIN-PROCEDURE.
DISPLAY "Amigo estou trabalhando"
ACCEPT mediaAritmetica
IF conta_carro < 10 AND 10 > 2 AND 10 <= 2 AND 10 < 2 OR 12> 11
DISPLAY "MUITO BOM"
END-IF
EVALUATE conta_carro
* DISPLAY "oi"
WHEN 1
COMPUTE
contador = (conta_carro + valorInicial) * 5
END-COMPUTE
WHEN 50
IF 9 < 14
DISPLAY "9 eh maior que 14"
ELSE
DISPLAY "nem vai entrar"
END-IF
WHEN 3
PERFORM UNTIL conta_carro < valorInicial AND 10 >= 2 AND 10 < 2
DISPLAY "aqui"
END-PERFORM
WHEN OTHER
DISPLAY "nao a 1 nem 2 nem 3"
END-EVALUATE
STOP RUN.
END PROGRAM MEUPROGRAMA.