Explore BrainMass

Explore BrainMass

    Multidimensional Arrays and Vectors

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    **I need the following in C++**
    The output needs to be in a table format.

    A company has a product line that includes five items that sell for $100, $75, $120, $150, and $35. There are four salespersons working for this company, and the following report is for a given week:

    Salesperson

    Item Number

    1 2 3 4 5

    1 10 4 5 6 7
    2 7 0 12 1 3
    3 4 9 5 0 8
    4 3 2 1 5 6

    Write a program to:
    -Compute the total dollar sales for each salesperson.
    -Compute the total commission for each salesperson if the commission rate is 10 percent.
    -Find the total income for each salesperson for the week if each salesperson receives a fixed salary of $500 per week in addition to commission payments.

    © BrainMass Inc. brainmass.com November 24, 2021, 1:10 pm ad1c9bdddf
    https://brainmass.com/computer-science/cpp/145690

    Solution Preview

    // sales.cpp : Defines the entry point for the console application.
    //

    //

    #include <iostream>
    #include <conio.h>
    using namespace std;

    static const int MAX_ITEMS = 5 ;
    static const int MAX_SP = 4 ; // sales persons

    static float s_price [MAX_ITEMS] = { 100.00, 75.00, 120.00, 150.00, 35.00} ; // $100, $75, $120, $150, and $35
    static int s_sales [MAX_SP] [MAX_ITEMS] = // ...

    Solution Summary

    Using multidimensional arrays and vectors in C++ is explained.

    $2.49

    ADVERTISEMENT