Computers and Technology
Computers and Technology, 15.09.2021 09:20, janny48

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, manyah6189
Amanda needs to create an informative print brochure for her local libraryā€™s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
image
Computers and Technology, 23.06.2019 01:50, jumoke26
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors. java.
Answers: 2
image
Computers and Technology, 23.06.2019 03:00, SKYBLUE1015
What are the different parts of computer
Answers: 2
image
Computers and Technology, 24.06.2019 03:30, ava1018
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
Do you know the correct answer?
Debug / This pseudocode should create a list that describes annual profit
// statistics for...

Questions in other subjects:

Konu
Mathematics, 26.09.2019 00:30
Konu
Mathematics, 26.09.2019 00:30