User input/Text: Difference between revisions

→‎{{header|BabyCobol}}: conform to the task definition
(+BabyCobol)
(→‎{{header|BabyCobol}}: conform to the task definition)
(One intermediate revision by the same user not shown)
Line 491:
=={{header|BabyCobol}}==
<syntaxhighlight lang="cobol">
* NB: whitespace insignificance and case insensitivity
* are used in the field name.
IDENTIFICATION DIVISION.
PROGRAM-ID. USER INPUT.
DATA DIVISION.
01 THREEHUNDRED DIGITCHAR NUMBERSTRING PICTURE IS 9X(3100).
01 PROCEDUREFIVE DIVISIONDIGIT NUMBER PICTURE IS 9(5).
PROCEDURE DIVISION.
DISPLAY "Enter a number: " WITH NO ADVANCING
DISPLAY "Enter a string of appropriate length: " WITH NO ADVANCING
ACCEPT ThreeDigit Number.
ACCEPT HundredChar String.
DISPLAY "Enter a number (preferably 75000): " WITH NO ADVANCING
ACCEPT ThreeDigitFiveDigit Number.
</syntaxhighlight>
 
18

edits