COBOLのソースコード変換:行末尾のピリオドをに変換する
COBOLの変換: 行末尾のピリオドを<PERIOD>に変換する ✏スクリプト import re # COBOLソースコード cobol_code = """ IDENTIFICATION DIVISION. PROGRAM-ID. FloatConditionalSample. DATA DIVISION. WORKING-STORAGE SECTION. 01 Age PIC 9(3). 01 Income PIC 9(7)V99 USAGE IS COMPUTATIONAL-3. 01 isStudent PIC X(1). 01 isSenior PIC X(1). 01 discountApplied PIC X(1) VALUE 'N'. 01 discountThreshold PIC 9(7)V99 USAGE IS COMPUTATIONAL-3 VALUE 50000.00. PROCEDURE DIVISION. DISPLAY "Enter age: ". ACCEPT Age. DISPLAY "Enter income: ". ACCEPT Income. DISPLAY "Are you a student? (Y/N): ". ACCEPT isStudent. DISPLAY "Are you a senior citizen? (Y/N): ". ACCEPT isSenior. IF Age >= 18 AND isStudent = 'Y' AND (Income > discountT