Anonymous user
User input/Text: Difference between revisions
Added COBOL example.
(Added COBOL example.) |
|||
Line 176:
(def s (.nextLine scan))
(def n (.nextInt scan))</lang>
=={{header|COBOL}}==
{{works with|OpenCOBOL}}
<lang cobol> IDENTIFICATION DIVISION.
PROGRAM-ID. Get-Input.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Input-String PIC X(30).
01 Input-Int PIC 9(5).
PROCEDURE DIVISION.
DISPLAY "Enter a string:"
ACCEPT Input-String
DISPLAY "Enter a number:"
ACCEPT Input-Int
GOBACK
.</lang>
=={{header|Common Lisp}}==
|