Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Examine the flowchart image below and then find and correct all the syntax and/or logical errors. a. start // This program continuously prompis a
2. Examine the flowchart image below and then find and correct all the syntax and/or logical errors. a. start // This program continuously prompis a user for mies chven utilis entered. While miles are not alons are entered and mpe is computed and disclayed Declarations namn mies nam galons namme num END_LVL - 0 Output how many miles did you drive? Ent to gat miles tot END VAL? No DLPtHow many galon of Badd yourse? output 'End of program input galons stop mg-nies/ salons b. See next page... // This program assigns a 10% discount a customer orders more than 12 items, and a 20% discount a customer orders more than 24 ens start housekeeping output "Enter customer nane >> Declarations string nane nu itens nun PRICEENI - 1.19 nun CUT OFFL - 12 nun CUT OFF2 - 24 UN DISCOUNT1 -0.10 nun DISCOUNT2 -0.02 un total string QUIT - "222" input nane return housekeeping detailLoop Yes output "Enter number of items >> nane QUIT? detailLoop) No input itens finish total - itens * PRICEEACH stop No Yes CUT OFF17 total - total - total DISCOUNT No Yes CUT OFF1? total-total- total . DISCOUNT finish output "Program finished output "Total for nare,"isS", total return "Enter customer mane or ". QUIT to quit " input name return 2. Examine the flowchart image below and then find and correct all the syntax and/or logical errors. a. start // This program continuously prompis a user for mies chven utilis entered. While miles are not alons are entered and mpe is computed and disclayed Declarations namn mies nam galons namme num END_LVL - 0 Output how many miles did you drive? Ent to gat miles tot END VAL? No DLPtHow many galon of Badd yourse? output 'End of program input galons stop mg-nies/ salons b. See next page... // This program assigns a 10% discount a customer orders more than 12 items, and a 20% discount a customer orders more than 24 ens start housekeeping output "Enter customer nane >> Declarations string nane nu itens nun PRICEENI - 1.19 nun CUT OFFL - 12 nun CUT OFF2 - 24 UN DISCOUNT1 -0.10 nun DISCOUNT2 -0.02 un total string QUIT - "222" input nane return housekeeping detailLoop Yes output "Enter number of items >> nane QUIT? detailLoop) No input itens finish total - itens * PRICEEACH stop No Yes CUT OFF17 total - total - total DISCOUNT No Yes CUT OFF1? total-total- total . DISCOUNT finish output "Program finished output "Total for nare,"isS", total return "Enter customer mane or ". QUIT to quit " input name return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started