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, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
What is the purpose of a computer network needs assessment? to analyze which workers need more training to improve their performance to compare worker productivity to determine what steps employees can take to increase company revenue to evaluate how to move from the current status to the desired goal
Answers: 2
question
Computers and Technology, 25.06.2019 04:20
Austin rare coins, inc., buys and sells rare coins, bullion, and other precious metals through eight web sites with different domain names. an unknown individual took control of austin's servers and transferred the domain names to another registrant without austin's permission. the new registrant began using the domain names to host malicious content—including hate letters to customers and fraudulent contact information—and to post customers' credit-card numbers and other private information, thereby tarnishing austin's goodwill. austin filed a suit in a federal district court against the new registrant under the anticybersquatting consumer protection act. is austin entitled to a transfer of the domain names? austin rare coins, inc., buys and sells rare coins, bullion, and other precious metals through eight web sites with different domain names
Answers: 3
You know the right answer?
DEBUG / This pseudocode should create a list that describes annual profit
// statistics for...
Questions
question
English, 04.06.2020 17:57
question
Geography, 04.06.2020 17:57
question
History, 04.06.2020 17:57
question
Mathematics, 04.06.2020 17:57
question
History, 04.06.2020 17:58
question
Mathematics, 04.06.2020 17:58
Questions on the website: 13722359