Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective The objective of this Programming Project is to write a C Program and to apply their knowledge of two-dimensional arrays and loops in C

Objective

The objective of this Programming Project is to write a C Program and to apply their knowledge of two-dimensional arrays and loops in C programming language.

Program Description

Write a program that would help a small company ABC, monitor the products sales made by its salespersons during a month. Use user-defined variables with descriptive names wherever necessary. (Hint: Program is similar to Lab4 Part 4. Make it generic with proper formatting.)

Following steps will have to be followed:

    1. Program must have header comments stating the author of the Program, date, and Program Description.
    2. Prompt the user to enter the number of Salespersons (Hint: can be treated as rows of 2-D Array) and Products (Hint: can be treated as cols of 2-D Array).
    3. For each Salesperson, prompt the user to enter Salesperson name and product sales made for each product).
    4. Product totals have to be displayed for each salesperson (row totals) and also product-wise total sales (column totals).
    5. The program should run continuously in a loop till the user wishes to exit.

Sample output / Program run is given here:

Enter no. of salesmen: 4

Enter no. of products: 3

Enter name of salesman followed by the number of products sold in each column respectively:

Kane 345 789 1000

Jane 1010 2780 1200

Abel 450 1234 890

Brad 760 1300 2100

Salesmen Products Total(Salesman)

Kane $345 $789 $1000 $2134

Jane $1010 $2780 $1200 $4990

Abel $450 $1234 $890 $2574

Brad $760 $1300 $2100 $4160

Total (Product) $2565 $6103 $5190

Process returned 0 (0x0) execution time : 71.276 s

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions