Skip to content

Commit

Permalink
Update A+B.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Jun 5, 2022
1 parent 03cc204 commit 6dbdde6
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions wiki/A+B.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,29 @@ process.stdin.on('data', function(chunk) {
});
```
------------------------------
```
Cobol
```Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. 'HELLOWORLD'.
ENVIRONMENT DIVISION.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 L PIC X(25).
01 A PIC 9999.
01 B PIC 9999.
01 C PIC ZZZ9.
01 S PIC X(20).
01 C-EDITED PIC X(20).
PROCEDURE DIVISION.
MAIN-PROCEDURE.
INPUTNUMBER SECTION.
ACCEPT L.
UNSTRING L
DELIMITED BY ' '
INTO A B.
COMPUTE C=A+B.
UNSTRING C DELIMITED BY ALL SPACES INTO S,C-EDITED.
DISPLAY C-EDITED.
STOP RUN.
```

0 comments on commit 6dbdde6

Please sign in to comment.