SuperMarket.cpp - SuperMarket.cpp This program creates a...

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

// SuperMarket.cpp - This program creates a report that lists weekly hours worked // by employees of a supermarket. The report lists total hours for // each day of one week. // Input: Interactive // Output: Report. /* Author: Joshua Smith Date: 10/31/2020 Course Number:202040-COP-1000-01B-41745-Principles of Programming Summary: This code is showing me the results of the code as printed. Errors: there were no Errors when compling and running the code. */ #include <iostream> #include <string> using namespace std; int main() { // Declare variables. const string HEAD1 = "WEEKLY HOURS WORKED"; const string DAY_FOOTER = " Day Total "; // Leading spaces in DAY_FOOTER are intentional. const string SENTINEL = "done"; // Named constant for sentinel value. double hoursWorked = 0; // Current record hours. string dayOfWeek; // Current record day of week. double hoursTotal = 0; // Hours total for a day.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture