English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Tax rate – sales tax rate for the community V999.
Item name – name of the hamburger or hotdog specialty purchased X(20)
Item count – number each of the item named 99
Item price – sales price of the item named 9V99

Once this information is collected you will calculate the
Item total = item price * item cnt
and add item total to subtotal and display item total to the screen.

Item name item count @ item price = item total

A program loop will be used to process items until no more items are left to be processed. You can assume if an item count of zero or item name of spaces are entered then the operator is through.
Display subtotal with a label
Subtotal subtotal
Calculate taxamount = subtotal * tax rate
Display
Tax taxamount

calculate final total = subtotal + taxamount
Display final total

Variables include:
taxrate – sales tax rate for the community.
itemname – name of the grocery item purchased
itemcnt – number each of the item named
itemprice – sales price of the item named
itemtot – total price of all of any one item
taxamt – total sales tax
subtot – total of all grocery items without sales tax
finaltot – total of all items plus sales tax

2007-02-13 02:15:33 · 2 answers · asked by jbrbbt 1 in Computers & Internet Programming & Design

2 answers

"Compiled form"?
Showing you the machine code wouldn't help much, would it?

You (or someone you pay) writes English-like COBOL sentences, such as

READ INPUT-FILE
AT END MOVE "Y" TO FILE-AT-END-SW
GO TO M99-MAIN-RTN-EXIT.

COMPUTE ITMTOT = ITEMPRICE * ITMCOUNT.

and so on.

Then you feed your COBOL program into a magic box called a compiler. The compiler translates human-readable code into machine-readable code. It produces a file of "compiled" code. The object code goes into a second magix box, a linker, which links your program with some subroutines. The linker outputs an executable program. Unless you can read machine code in hex, you wouldn't find the compiled form very useful.

2007-02-15 01:43:33 · answer #1 · answered by Anonymous · 0 0

Does your instructor also want IPO charts, flow charts, and pseudocode?

2007-02-13 13:16:21 · answer #2 · answered by BigRez 6 · 0 0

fedest.com, questions and answers