1 / 10

Loop Assignment

Loop Assignment. There are no speaker notes to accompany this assignment. Data that you should use in doing this assignment. Start.

hana
Download Presentation

Loop Assignment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Loop Assignment There are no speaker notes to accompany this assignment.

  2. Data that you should use in doing this assignment.

  3. Start Problem #1: I want to produce a report using the logic shown. The report should contain ItemNo, ItemName, Price, Cost and Profit. Profit is the difference between Price and Cost. Initializing Read a record Not EOF Y Set up line for report Calculate profit Write line on report Read a record N Stop

  4. Start Process Calculate profit Initializing Read a record Set up line for report Not EOF Y process() N Write line on report Stop Read a record End Process Problem #2: Is there any difference in the output using the logic in problem #1 and using the logic shown here? Explain.

  5. Start Process Initializing Read a record OnHand > 25 Y N Not EOF Y Set up line for report process() N Stop Write line on report Read a record End Process Problem #3: Produce this report. The output should show ItemNo, ItemName, OnHand and OnOrder.

  6. Start Problem #4: Produce this report. The output should show ItemNo, ItemName, OnHand and OnOrder. Process Initializing Read a record OnHand > 25 Y N OnOrder > 25 Not EOF Y N Y process() Set up line for report Set up line for report N Stop Write line on report Write line on report Read a record End Process

  7. Program: start input/read record do while not EOF process() end while loop stop process() if OnHand > 25 and Price > 75 setup line for report write line for report end if input/read a record end process Problem #5: Produce this report. The output should show ItemNo, ItemName, OnHand and Price.

  8. process() if VendorNo = “124” if OnOrder > 10 setup line for report write line for report else if Price > 100.00 setup line for report write line for report end if end if end if input/read a record end process Program: start input/read record do while not EOF process() end while loop stop Problem #6: Produce this report. The output should show ItemNo, ItemName, OnHand, OnOrder and Price.

  9. Program: start input/read record do while not EOF process() end while loop stop process() if VendorNo = “124” and OnOrder > 10 or Price > 100 setup line for report write line for report end if input/read a record end process Problem #7: Produce this report. The output should show ItemNo, ItemName, OnHand, OnOrder and Price.

  10. Program: start input/read record do while not EOF process() end while loop stop process() if VendorNo = “124” and (OnOrder > 10 or Price > 100) setup line for report write line for report end if input/read a record end process Problem #8: Produce this report. The output should show ItemNo, ItemName, OnHand, OnOrder and Price.

More Related