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

Illustration of perform with varying option, Illustration of Perform with v...

Illustration of Perform with varying option: A) Perform para-3 varying the k from 1 by 1 until k > 10. Here para-3 will be constantly executed 10 times (For k=1,2,3, .....1

Example of constructing an arithmetic expression, Example of constructing a...

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

Sequential files, SEQUENTIAL FILES:   The purpose of the proposed sec...

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

File characteristics, FILE CHARACTERISTICS: The task of file handling ...

FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

Data division, Data Division: The Data Division is a part of the COBOL...

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

Program for divide verb, PROGRAM FOR DIVIDE VERB:   We have to write ...

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

Currency sign - edit characters for numeric data, Currency Sign - edit char...

Currency Sign - edit characters for numeric data: $ (Currency Sign): The single currency sign can appear at the leftmost place of a picture. In that situation the $ cha

Statements for sequential files , STATEMENTS FOR SEQUENTIAL FILES: A b...

STATEMENTS FOR SEQUENTIAL FILES: A basic operation on a file includes the reading and writing of its records. Whenever the file is sequential, there are three verbs for the

Conditions-name condition, CONDITIONS-NAME CONDITION:   The condition...

CONDITIONS-NAME CONDITION:   The condition name is an entity which itself is a condition and these can have either a true or false value. Though, a condition name cannot be d

Program for multiply verb, PROGRAM FOR MULTIPLY VERB: We have to write...

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. Pr

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