subject
Computers and Technology, 15.09.2021 07:20 memeE15

DEBUG / This pseudocode should create a list that describes annual profit
// statistics for a retail store. Input records contain a department
// name (for example, “Cosmetics”) and profits for each quarter for
// the last two years. The program should determine whether
// the profit is higher, lower, or the same
// for this full year compared to the last full year.

start
Declarations
string department
num salesQuarter1ThisYear
num salesQuarter2ThisYear
num salesQuarter3ThisYear
num salesQuarter3ThisYear
num salesQuarter1LastYear
num salesQuarter2LastYear
num salesQuarter3ThisYear
num salesQuarter4LastYear
num totalThisYear
num totalLastYear
string status
num QUIT = ""
housekeeping()
while department <> QUIT
compareProfit()
endwhile
finishUp()
stop

housekeeping()
output "Enter department name or ", QUIT, " to quit "
input dept
return

compareProfit()
getSalesData()
sumSalesData()
if totalThisYear = totalLastYear then
status = "Higher"
else
if totalThisYear <= totalLastYear then
status = "Lower"
else
status = "Same"
endif
endif
output department, status
output "Enter department name or ", QUIT, " to quit "
input department
return

getSalesData()
output "Enter sales for first quarter this year "
input salesQuarter1ThisYear
output "Enter sales for second quarter this year "
input salesQuarter1ThisYear
output "Enter sales for third quarter this year "
input salesQuarter1ThisYear
output "Enter sales for fourth quarter this year "
input salesQuarter4ThisYear
output "Enter sales for first quarter last year "
input salesQuarter1LastYear
output "Enter sales for second quarter last year "
input salesQuarter3LastYear
output "Enter sales for third quarter last year "
input salesQuarter3LastYear
output "Enter sales for fourth quarter last year "
input salesQuarter3LastYear
return

sumSalesData()
totalThisYear = salesQuarter1ThisYear + salesQuarter2ThisYear +
salesQuarter2ThisYear + salesQuarter4ThisYear
totalLastYear = salesQuarter2LastYear + salesQuarter2LastYear +
salesQuarter3LastYear + salesQuarter4LastYear
return

finishUp()
output "End of report"
return

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:00
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
question
Computers and Technology, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
You know the right answer?
DEBUG / This pseudocode should create a list that describes annual profit
// statistics for...
Questions
question
Mathematics, 30.12.2019 21:31
question
Arts, 30.12.2019 21:31
question
English, 30.12.2019 21:31
question
Chemistry, 30.12.2019 21:31
Questions on the website: 13722362