You are developing a COBOL program to calculate the total sales for a retail store. Which COBOL statement would you use to add the sales amounts from multiple transactions?
- ADD statement
- COMPUTE statement
- MULTIPLY statement
- SUM statement
In COBOL, the ADD statement is used to perform arithmetic addition. It is suitable for adding sales amounts from multiple transactions to calculate the total sales in a retail store program. The COMPUTE statement is more versatile but ADD is commonly used for simple additions.
Loading...
Related Quiz
- In COBOL, the ________ clause can be used with the OPEN verb to specify the file access mode.
- Which file processing technique is suitable when you need to read records in the order they were added to the file?
- Explain the significance of the SHAREOPTION clause when dealing with VSAM indexed files in a multi-user environment.
- In COBOL, what is the purpose of the PERFORM statement?
- Explain the concept of "nested scope" in COBOL with an example.