Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
12
Task/User-input-Text/BabyCobol/user-input-text.cobol
Normal file
12
Task/User-input-Text/BabyCobol/user-input-text.cobol
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
* NB: whitespace insignificance and case insensitivity
|
||||
* are used in the field name.
|
||||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. USER INPUT.
|
||||
DATA DIVISION.
|
||||
01 HUNDRED CHAR STRING PICTURE IS X(100).
|
||||
01 FIVE DIGIT NUMBER PICTURE IS 9(5).
|
||||
PROCEDURE DIVISION.
|
||||
DISPLAY "Enter a string of appropriate length: " WITH NO ADVANCING
|
||||
ACCEPT HundredChar String.
|
||||
DISPLAY "Enter a number (preferably 75000): " WITH NO ADVANCING
|
||||
ACCEPT FiveDigit Number.
|
||||
|
|
@ -3,7 +3,7 @@ import extensions;
|
|||
public program()
|
||||
{
|
||||
var num := new Integer();
|
||||
console.write:"Enter an integer: ".loadLineTo:num;
|
||||
console.write("Enter an integer: ").loadLineTo(num);
|
||||
|
||||
var word := console.write:"Enter a String: ".readLine()
|
||||
var word := console.write("Enter a String: ").readLine()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue