Download presentation
Presentation is loading. Please wait.
Published byClarissa Lawrence Modified over 9 years ago
1
Loop Assignment There are no speaker notes to accompany this assignment.
2
Data that you should use in doing this assignment.
3
Start Initializing Read a record Not EOF Calculate profit Read a record Y N Stop Set up line for report Write line on report 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.
4
Start Initializing Read a record Not EOF Y N Stop Problem #2: Is there any difference in the output using the logic in problem #1 and using the logic shown here? Explain. Calculate profit Read a record Set up line for report Write line on report process() Process End Process
5
Start Initializing Read a record Not EOF Y N Stop process() Read a record Set up line for report Write line on report Process End Process OnHand > 25 Y N Problem #3: Produce this report. The output should show ItemNo, ItemName, OnHand and OnOrder.
6
Start Initializing Read a record Not EOF Y N Stop process() Read a record Set up line for report Write line on report Process End Process OnHand > 25 Y N OnOrder > 25 Set up line for report Write line on report YN Problem #4: Produce this report. The output should show ItemNo, ItemName, OnHand and OnOrder.
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
Program: start input/read record do while not EOF process() end while loop stop 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 input/read a record end process 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.