Input idnumber itemdesc numdays minreqbid return

This preview shows page 5 - 12 out of 71 pages.

input idNumber, itemDesc, numDays, minReqBidreturndetail()if minReqBid > MIN_BID thenoutput idNumber, itemDesc, numDays, minReqBidendifreturn
Programming Logic and Design, 7eSolutions 4-6finish()output “End of program”returnb. A program that continuously accepts auction data until a sentinel value is entered and displays a list of all data for auctions in which the minimum required bid is over $100.00.
Programming Logic and Design, 7eSolutions 4-7string itemDescnum MIN_BID = 100num QUIT = -1string ID_PROMPT = “Enter an ID number or -1 to quit >> ”housekeeping()while idNumber <> QUITdetailLoop()endwhilefinish()stophousekeeping()output ID_PROMPTinput idNumberreturndetailLoop() input itemDesc, numDays, minReqBidif minReqBid > MIN_BID thenoutput idNumber, itemDesc, numDays, minReqBidendifoutput ID_PROMPTinput idNumberreturnfinish()output “End of program”returnc. A program that continuously accepts auction data and displays data for every auction in which the minimum bid is $0.00 and the length of the auction is one day or less.
Programming Logic and Design, 7eSolutions 4-8Pseudocode:startDeclarationsnum idNumbernum numDaysnum minReqBidstring itemDescnum MIN_BID = 0num MIN_DAYS = 1num QUIT = -1string ID_PROMPT = “Enter an ID number or -1 to quit >> ”housekeeping()while idNumber <> QUITdetailLoop()endwhilefinish()stophousekeeping()
Programming Logic and Design, 7eSolutions 4-9output ID_PROMPTinput idNumberreturndetailLoop()input itemDesc, numDays, minReqBidif minReqBid = MIN_BID AND numDays <= MIN_DAYS thenoutput idNumber, itemDesc, numDays, minReqBidendifoutput ID_PROMPTinput idNumberreturnfinish()output “End of program”returnd. A program that continuously accepts auction data and displays data for every auction in which the length is between 7 and 30 days inclusive.
Programming Logic and Design, 7eSolutions 4-10Pseudocode:startDeclarationsnum idNumbernum numDaysnum minReqBidstring itemDescnum MIN_DAYS = 7num MAX_DAYS = 30num QUIT = -1string ID_PROMPT = “Enter an ID number or -1 to quit >> ”housekeeping()while idNumber <> QUITdetailLoop()endwhilefinish()stophousekeeping()
Programming Logic and Design, 7eSolutions 4-11output ID_PROMPTinput idNumberreturndetailLoop()input itemDesc, numDays, minReqBidif numDays >= MIN_DAYS AND numDays <= MAX_DAYS thenoutput idNumber, itemDesc, numDays, minReqBidendifoutput ID_PROMPTinput idNumberreturnfinish()output “End of program”returne. A program that prompts the user for a maximum required bid and then continuously accepts auction data and displays data for every auction in which the minimum bid is less than or equal to the amount entered by the user.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture