COBOL Multiply动词

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
   WORKING-STORAGE SECTION.
   01 WS-NUM1 PIC 9(9) VALUE 10 .
   01 WS-NUM2 PIC 9(9) VALUE 10.
   01 WS-NUM3 PIC 9(9) VALUE 10.
   01 WS-NUMA PIC 9(9) VALUE 10.
   01 WS-NUMB PIC 9(9) VALUE 10.
   01 WS-NUMC PIC 9(9) VALUE 10.

PROCEDURE DIVISION.
   MULTIPLY WS-NUM1 BY WS-NUM2 WS-NUM3.
   MULTIPLY WS-NUMA BY WS-NUMB GIVING WS-NUMC.

   DISPLAY "WS-NUM1     : " WS-NUM1
   DISPLAY "WS-NUM2     : " WS-NUM2
   DISPLAY "WS-NUM3     : " WS-NUM3
   DISPLAY "WS-NUMA     : " WS-NUMA
   DISPLAY "WS-NUMB     : " WS-NUMB
   DISPLAY "WS-NUMC     : " WS-NUMC

STOP RUN.

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265743.html

(0)
上一篇 2022年6月7日
下一篇 2022年6月7日

相关推荐

发表回复

登录后才能评论