forked from alura-cursos/cursoopencobol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
virgula-mascara.cbl
40 lines (32 loc) · 1.24 KB
/
virgula-mascara.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
IDENTIFICATION DIVISION.
PROGRAM-ID. PRGCOB04.
******************************************************
*** AREA DE COMENTARIOS - REMARKS
*** OBJETIVO DO PROGRAMA = RECEBER NOME E SALARIO
*** IMPRIMIR FORMATADO - USO DE VARIAVEIS MASCARA E COM VIRGULA
*** AUTOR: IVAN
*** DATA : XX/XX/20XX
******************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WRK-NOME PIC X(30) VALUE SPACES.
77 WRK-SALARIO PIC 9(06)V99 VALUE ZEROS.
77 WRK-SALARIO-ED PIC $ZZZ.ZZ9,99 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY 'DIGITE SEU NOME..... : '
WITH NO ADVANCING
ACCEPT WRK-NOME
DISPLAY 'DIGITE SEU SALARIO.. : '
WITH NO ADVANCING
ACCEPT WRK-SALARIO
DISPLAY '--------- SAIDA DE DADOS ------------'
DISPLAY 'NOME..... : ' WRK-NOME
DISPLAY 'SALARIO.. : ' WRK-SALARIO
MOVE WRK-SALARIO TO WRK-SALARIO-ED
DISPLAY 'SALARIO.. : ' WRK-SALARIO-ED
STOP RUN
.