Declare an int constant MonthsInDecade whose value is the value of the constant MonthsInYear (already declared ) multiplied by 10.

1
Declare an int constant MonthsInDecade whose value is the value of the constant MonthsInYear (already declared ) multiplied by 10.

LANGUAGE: C++

CHALLENGE:

Declare an int constant MonthsInDecade whose value is the value of the constant MonthsInYear (already declared ) multiplied by 10.

SOLUTION:



const int MonthsInDecade = MonthsInYear * 10;

One comment

  • sabrina says:

    A high-end coffee shop has just hired you as their senior programmer. They have tasked you to design and implement two C++ applications allowing employees to take orders from its customers and to determine weekly sales.

    Application #1: Create an application allowing employees to take orders and then tally up the total costs from its customers.

    The coffee shop offers the following items on its menu:
    • Coffee
    • Tea
    • Soda
    • Juice
    • Manager Special (store manager offers a drink of their choice to customers)

    The application must be able to:
    • Accept one or more drinks in a single order; use a sentinel value to terminate an order
    • Once an order has been placed, tally up the total cost of the order

    Application #2: Create another application to process an input file, weekly_sales.txt, and tally up its weekly sales total. The data file consists of 7 entries representing the sales from last week.

    If the input file does not exist, prompt user to try again.

Add comment