Program for multiply verb, COBOL Programming

Assignment Help:

PROGRAM FOR MULTIPLY VERB:

We have to write a simple program to elaborate MULTIPLY verb. You can also use the edit characters in the program.

Identification division.

Program- id. Mulverb.

Environment division.

Data division.

Working-storage section.

77  a  pic  s9(3)v9(2) value 0.

77   b  pic   s9(3)v9(2) value 0.

77   c pic    s9(4)v9(2) value 0.

77   e-c pic  -z(4).z(2).

Procedure division.

Para-1.

 Display(1 1) erase.

 Display(3 5) "Enter first number :".

 Accept a.

 Display(5 5) "Enter second number :".

 Accept b.

 Multiply a by b giving  c.

 Move c to e-c.

  Display(15 5) "Product = " e-c.

  Stop run.

Description:   This program gets 2 inputs from the user.

                      It multiplies them by using the MULTIPLY verb. 

                      a*b is found and stored in c.

                      The unedited result is accessible in c.

                      We move c to e-c, where the edit characters are accessible.

                      Keep in mind that the variable e-c makes use of the - edit character.

                       The e-c will always be exhibited with result. 


Related Discussions:- Program for multiply verb

Size - picture clause, Size: The number of characters or digits needed...

Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can

Program for add verb, PROGRAM FOR ADD VERB: We have to write a simple ...

PROGRAM FOR ADD VERB: We have to write a simple program to elaborate the ADD verb. You can also use edit characters in the program. Identification division. Program- id.

Add verb, ADD VERB: The ADD Verb can be used to find the sum of two or ...

ADD VERB: The ADD Verb can be used to find the sum of two or more numbers and to store the sum.  The ADD verb takes any one of the two forms as shown below:

Display statement, DISPLAY STATEMENT:   The function of the DISPLAY s...

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

Program for condition names , PROGRAM FOR CONDITION NAMES: We have to ...

PROGRAM FOR CONDITION NAMES: We have to write a simple program to demonstrate Condition names usage.  identification division.   program- id.   environment division.

Program for add corresponding, PROGRAM FOR ADD CORRESPONDING: We have ...

PROGRAM FOR ADD CORRESPONDING: We have to write a simple program to demonstrate Add Corresponding.   identification division.   program- id.   environment division.

Blank insertion and zero insertion, B (Blank Insertion) : The occurren...

B (Blank Insertion) : The occurrence of a B anyplace in the picture will insert a space character in the edited data. There can be more than one B in the picture. Examples:

Move verb - cobol programming, Introduction to MOVE Verb: The aim of th...

Introduction to MOVE Verb: The aim of this section is to introduce the learner how to move data from one place to the other place in the memory. This is completed with the help

File description- fixed-length records, FILE DESCRIPTION- FIXED-LENGTH RECO...

FILE DESCRIPTION- FIXED-LENGTH RECORDS: The normal characteristics of a file are explained in the file description (FD) entry of the DATA DIVISION.

#Array, Major difference between file and array how does record read from a...

Major difference between file and array how does record read from array and file why we are not preparing array for real time

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd