User input/Text: Difference between revisions

Content added Content deleted
(→‎{{header|BabyCobol}}: remove stray space)
(→‎{{header|BabyCobol}}: conform to the task definition)
Line 496: Line 496:
PROGRAM-ID. USER INPUT.
PROGRAM-ID. USER INPUT.
DATA DIVISION.
DATA DIVISION.
01 THREE DIGIT NUMBER PICTURE IS 9(3).
01 HUNDRED CHAR STRING PICTURE IS X(100).
01 FIVE DIGIT NUMBER PICTURE IS 9(5).
PROCEDURE DIVISION.
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 FiveDigit Number.
</syntaxhighlight>
</syntaxhighlight>