Input department return getsalesdata sumsalesdata if

This preview shows page 2 - 4 out of 4 pages.

input department return 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 3.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture