Question about Operating Systems

Open Question

Use a two dimentional array to slove the following prblm. A company has four salespeople (w/ salesperson number 1 to 4) Who sell five different products (w/ product number 1 to 5) Once a day each salesperson passes in a slip for each different type of product sold each slip contains: 1. The salesperson number 2. The product number 3.The total dollar value of that product sold that day. Thus each sales person passes in 0 to 5 sales slips per day. Assume that the information from all of slips for last month is available. While the program that will read all this information for last month sales and summarize the total sales by salesperson by product. All totals should be stored in the two dimensional array sales. After processing all the information for last month, point the result tabular format w/ each of the columns representing a particular salesperson & each of the rows representing a particular product. Cross total each row to get the total sales of each product for last month Cross total each column to get total sales by salesperson for last month Your neat tabular printout should include these cross total to the right of the totaled rows & to the bottom of the total columns.

Posted by on

  • 1 more comment 
  • prcat87 Apr 12, 2009





    I have a similar problem to code in C++.
    Can anybody help?
    prcat87












    Create a two-dimensional array to solve the following problem:
    A
    company has four salespeople who sell five different products. Once a
    day, each salesperson passes in a slip for each different type of
    product sold. The slip indicates the salesperson number (1-4) the
    product number (1-5) and the total value of that product sold for the
    day. Each sales person will turn in up to 5 sales slips per day.
    Create an array to hold the salesperson's name: 1- Joe, 2 - James, 3 - Jeff, 4 - Jake
    Create an array to hold the product information: 1 - Tubes, 2 - Tires, 3 - Sproket, 4 - Peg, 5 - Caliper
    Write
    a program that will take in the information for last month's sales and
    summarize the totals by salesperson, by product. All totals should be
    stored in a two-dimensional array entitled sales. After processing all
    the information (input), print the results in a tabular format with
    each of the columns representing a particular salesperson and each row
    representing a particular product. Cross total each row and column.
    Example:
    Joe James Jeff Jake total
    Tubes xx xx xx xx xx
    Tires xx xx xx xx xx
    Sproket xx xx xx xx xx
    Peg xx xx xx xx xx
    Caliper xx xx xx xx xx
    --------------------------------------------------------------------------
    total xx xx xx xx xx
    use the following information:
    sales person product amount
    1 1 250.00
    2 1 125.00
    3 1 095.00
    4 1 065.00
    1 2 080.00
    2 2 525.00
    3 2 125.00
    4 2 365.00
    1 3 050.00
    2 3 755.00
    3 3 690.00
    4 3 650.00
    1 4 210.00
    2 4 163.25
    3 4 012.00
    4 4 652.50
    1 5 195.35
    2 5 475.82
    3 5 237.50
    4 5 632.25



  • Anonymous Apr 30, 2009

    using java

  • Kuldeep Kumar Dubey
    Kuldeep Kumar Dubey May 11, 2010

    Hi,

    In which language/technology do you want this?

    Thanks.


×

3 Suggested Answers

  • 10406 Answers

SOURCE: Write a program to implement a survey that prompts

Need help doing your homework?

Here's a solution, written in BASIC:

10 PRINT, "Hello World"
20 EXIT

Posted on May 14, 2009

  • 59 Answers

SOURCE: Write a program that will

the only possible solution that i can think of is Flash since u want to run it on every OS.

Posted on Jul 07, 2009

  • 10406 Answers

SOURCE: Simulate the Shortest Job First CPU scheduling algorithm

Nice try! Find an upper-class student to give you one-on-one tutoring for your homework.

Posted on Dec 02, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How do I change the number of rings before call goies to voice mail?


1. Press the star (*) key on your phone. Follow this symbol with the number "61." Press star (*) once more. Then, click "Send" to place the call.
2. Type the number one (1) and then enter the number for your voicemail box.
3. Press star (*) twice
4. Enter a time amount. This number will be how many seconds your phone rings before the call goes to your voicemail. This number can only be changed in multiples of five. The maximum time you can enter is 30 seconds.
5. Press pound (#). Your settings will be changed.

Mar 12, 2011 | Operating Systems

3 Answers

How can i reformat my computer using windows xp cd,but no cd key?


if you know the Administrator password of the current XP installation on the harddrive, you can boot from the installation CD, choose the option "repair windows" and "recovery console".
After enterng the admininstrator password you will get the standard "old MS-DOS lookalike" console when you will be able to format the entire disk.

Feb 28, 2011 | Microsoft Operating Systems

1 Answer

How and i get a free key serial number of kasperskey latest edition


Prince,
You are not going to like my answer to your problem but you do not have a chance. Reason being that all the software companies earn their living by selling their software. And each copy of the software has its unique serial number. Even if I give you mine, it will not work because your copy if different to mine and so is the serial number. The only answer is to buy a copy legally and use it on you laptop or computer. One machine, one copy.
Also it is culpable to use software the way you want to.
However, if any software is for trial purpose only then the serial number will come with it.

Feb 06, 2011 | Operating Systems

1 Answer

What are the arguments uses by c language and types of arguments


The arguments that are passed to a c program are argc and argv, they are passed to main as:
int main ( int argc, char **argv )
argc is a number which holds how many arguments were passed.
argv is an array of arrays which holds the text values of each of the arguments passed to the program.

For example to get the first argument passed to the program you can access it as argv[1] and treat it just as you would treat any char *. Note that argv[0] always contains the name of the program and is not counted in argc.


Hope this helps, and thank you for using FixYa.

Chartreuse,

Jan 28, 2011 | Operating Systems

1 Answer

Convert numbers to text in excell


  1. Start Microsoft Excel.
  2. Press ALT+F11 to start the Visual Basic Editor.
  3. On the Insert menu, click Module.
  4. Type the following code into the module sheet. Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Dollars, Cents, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' String representation of amount. MyNumber = Trim(Str(MyNumber)) ' Position of decimal place 0 if none. DecimalPlace = InStr(MyNumber, ".") ' Convert cents and set MyNumber to dollar amount. If DecimalPlace > 0 Then Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _ "00", 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If Count = 1 Do While MyNumber <> "" Temp = GetHundreds(Right(MyNumber, 3)) If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars If Len(MyNumber) > 3 Then MyNumber = Left(MyNumber, Len(MyNumber) - 3) Else MyNumber = "" End If Count = Count + 1 Loop Select Case Dollars Case "" Dollars = "No Dollars" Case "One" Dollars = "One Dollar" Case Else Dollars = Dollars & " Dollars" End Select Select Case Cents Case "" Cents = " and No Cents" Case "One" Cents = " and One Cent" Case Else Cents = " and " & Cents & " Cents" End Select SpellNumber = Dollars & Cents End Function ' Converts a number from 100-999 into text Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If Mid(MyNumber, 1, 1) <> "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. If Mid(MyNumber, 2, 1) <> "0" Then Result = Result & GetTens(Mid(MyNumber, 2)) Else Result = Result & GetDigit(Mid(MyNumber, 3)) End If GetHundreds = Result End Function ' Converts a number from 10 to 99 into text. Function GetTens(TensText) Dim Result As String Result = "" ' Null out the temporary function value. If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19... Select Case Val(TensText) Case 10: Result = "Ten" Case 11: Result = "Eleven" Case 12: Result = "Twelve" Case 13: Result = "Thirteen" Case 14: Result = "Fourteen" Case 15: Result = "Fifteen" Case 16: Result = "Sixteen" Case 17: Result = "Seventeen" Case 18: Result = "Eighteen" Case 19: Result = "Nineteen" Case Else End Select Else ' If value between 20-99... Select Case Val(Left(TensText, 1)) Case 2: Result = "Twenty " Case 3: Result = "Thirty " Case 4: Result = "Forty " Case 5: Result = "Fifty " Case 6: Result = "Sixty " Case 7: Result = "Seventy " Case 8: Result = "Eighty " Case 9: Result = "Ninety " Case Else End Select Result = Result & GetDigit _ (Right(TensText, 1)) ' Retrieve ones place. End If GetTens = Result End Function ' Converts a number from 1 to 9 into text. Function GetDigit(Digit) Select Case Val(Digit) Case 1: GetDigit = "One" Case 2: GetDigit = "Two" Case 3: GetDigit = "Three" Case 4: GetDigit = "Four" Case 5: GetDigit = "Five" Case 6: GetDigit = "Six" Case 7: GetDigit = "Seven" Case 8: GetDigit = "Eight" Case 9: GetDigit = "Nine" Case Else: GetDigit = "" End Select End Function
uparrow.gifBack to the top How to use the SpellNumber sample function loadTOCNode(2, 'moreinformation'); To use the sample functions to change a number to written text, use one of the methods demonstrated in the following examples: uparrow.gifBack to the top Method 1: Direct Entry loadTOCNode(2, 'moreinformation'); You can change 32.50 into "Thirty Two Dollars and Fifty Cents" by entering the following formula into a cell: =SpellNumber(32.50) uparrow.gifBack to the top Method 2: Cell reference loadTOCNode(2, 'moreinformation'); You can refer to other cells in the workbook. For example, enter the number 32.50 into cell A1, and type the following formula into another cell: =SpellNumber(A1) uparrow.gifBack to the top Method 3: Paste Function or Insert Function loadTOCNode(2, 'moreinformation'); To enter a custom function into a worksheet, you can use Paste Function in Excel 2000, or you can use Insert Function in Excel 2002 and in Excel 2003. Excel 2000 loadTOCNode(3, 'moreinformation'); To use Paste Function, follow these steps:
  1. Select the cell that you want.
  2. Click Paste Function on the Standard toolbar.
  3. Under Function category, click User Defined.
  4. Under Function name, click SpellNumber, and then click OK.
  5. Enter the number or cell reference that you want, and then click OK.
Excel 2002 and Excel 2003 loadTOCNode(3, 'moreinformation'); To use Insert Function, follow these steps:
  1. Select the cell that you want.
  2. Click Insert Function on the Standard toolbar.
  3. Under Or select a category, click User Defined.
  4. In the Select a function list, click SpellNumber, and then click OK.
  5. Enter the number or cell reference that you want, and then click OK.

Apr 01, 2010 | Microsoft Windows XP Professional

1 Answer

Lg kg195 is not connet pc for internet


u need to call ur Mobile company and ask them u configure ur mobile for this service. Tell them u want to use the phone to access internt on your PC. They will help u setup the connection

Mar 24, 2010 | Microsoft Windows Vista Ultimate Edition

1 Answer

Program of c to find largest and second larhest number of given 50 numbers using array


This code generates some random number to test.


#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{ findLargest();
return 0;
}

int findLargest()
{ int someNumbers[50];
int i;

// to generate some numbers for us to test
for(i=0; i<50; i++)
// generate a random number between 0-100
someNumbers[i] = rand() % 100;

// for keeping track of numbers, set as smallest possible
int largest = INT_MIN;
int largest2 = INT_MIN;

// go through each item in the array
for(i=0; i<50; i++)
{ // if bigger than our previous max, set as new max
if (someNumbers[i] > someNumbers[largest])
largest = i;
// if it's not been set as new max, and is bigger than current 2nd largest
else if(someNumbers[i] > someNumbers[largest2])
largest2 = i;

// for printing all numbers in the array
printf("%d | %d\n",i, someNumbers[i]);
}

// print largest numbers and their position in the array
printf("largest %d (pos %d).\n2nd largest %d (pos %d)",
someNumbers[largest],
largest,
someNumbers[largest2],
largest2
);

return 0;

}

May 07, 2009 | Operating Systems

1 Answer

Array


I'm going to guess that your question is about hard disk arrays

There are several uses for arrays and there are different level of arrays

Here is a link detailing the levels and uses for hard disk arrays:

http://en.wikipedia.org/wiki/RAID_1#RAID_1

Jan 31, 2009 | Operating Systems

1 Answer

1. A software company has the following information about its cl


Shouldn't you be doing your own school homework?

Nov 18, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

484 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18299 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...