Course Hero Logo

homework_assignment2_v2.docx - Chpt.2 Exercise 5 a a)...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 3 out of 6 pages.

Chpt.2 Exercise 5 aa) Hierarchy chart: this is the same for both a) and b) of this problemb) logic design - PseudocodestartDeclarationsnum actualPricenum salePricenum profitstring PROMPT_ACTUAL_PRICE = “Input the actual price in dollars”string PROMPT_SALEL_PRICE = “Input the sale price in dollars”string END_LINE = “Computations complete, have a good day.”houseKeeping()detail()endOfJob()stopdetail()output PROMPT_SALEL_PRICEinput salePriceprofit = salePrice - actualPriceoutput profitreturnhouseKeeping()output PROMPT_ACTUAL_PRICEinput actualPricereturnendOfJob()output END_LINEreturnMain ProgramhouseKeeping()detail()endOfJob()
Chpt.2 Exercise 5 ba) Hierarchy chart: this is the same for both a) and b) of this problemb) logic design – PseudocodestartDeclarationsnum actualPricenum salePricenum profitstring PROMPT_ACTUAL_PRICE = “Input the actual price in dollars”string PROMPT_SALE_PRICE = “Input the sale price in dollars”string END_LINE = “Computations complete, have a good day.”houseKeeping()while not (actualPrice = 0)detail_Loop ()endwhileendOfJob()stopdetail_Loop()output PROMPT_SALE_PRICEinput salePriceprofit = salePrice - actualPriceoutput profitoutput PROMPT_ACTUAL_PRICEinput actualPricereturnhouseKeeping()

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 6 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
NUM, A Good Day

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture