Javscript please I need a pseudocode and flowchart Use singl

Javscript please, I need a pseudocode and flowchart.

Use single subscripted array(s) to solve the following problem. A company pays its sales people on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $3000 in sales in a week receives $200 plus 9% of $3000, or a total of $470. Design a program that determines how many of the salespeople earned salaries in each of the following ranges.

$200-$299

$300-$399

$400-$499

$500-$599

$600-$699

$700-$799

$800-$899

$900-$999

$1000 and over

You will need to declare two arrays, one to hold the salary range and the other to accumulate the count of salespeople in that range.

When you have to check for a range you store either the lowest value in each range in the array and compare the salary to each of those values or you can store the highest value and compare to that. The only change will be the relational operator that you use for your comparison.

Which ever configuration you decide to use should be duplicated in a parallel counter array so that when you determine which range the sales fit into you have the subscript for the counter array already determined.

Your output should list the salary range and the number of salespeople in that range.

Don\'t forget to include modules in your solution.

Don\'t forget to include modules in your solution.

Solution

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

int main (void)

{

int salesperson[9] = {0};

int gross = 0;

int commission = 0;

while(gross != -1)

{

printf(\"Enter gross sales: \");

scanf(\"%d\", &gross);

if (commission >= 200 && commission <= 299)

{

salesperson[0]++;

}

else if (commission >= 300 && commission <= 399)

{

salesperson[1]++;

}

else if (commission >= 400 && commission <= 399)

{

salesperson[2]++;

}

else if (commission >= 500 && commission <= 599)

{

salesperson[3]++;

}

else if (commission >= 600 && commission <= 699)

{

salesperson[4]++;

}

else if (commission >= 700 && commission <= 799)

{

salesperson[5]++;

}

else if (commission >= 800 && commission <= 899)

{

salesperson[6]++;

}

else if (commission >= 900 && commission <= 999)

{

salesperson[7]++;

}

else if (commission >= 1000)

{

salesperson[8]++;

}

commission = 200 + (.09 * gross);

}

printf(\"a) $200-299:%d\ \", salesperson[0]);

printf(\"b) $300-399: %d\ \", salesperson[1]);

printf(\"c) $400-499: %d\ \", salesperson[2]);

printf(\"d) $500-599; %d\ \", salesperson[3]);

printf(\"e) $600-699: %d\ \", salesperson[4]);

printf(\"f) $700-799: %d\ \", salesperson[5]);

printf(\"g) $800-899: %d\ \", salesperson[6]);

printf(\"h) $900-999: %d\ \", salesperson[7]);

printf(\"i) $1000 and over: %d\ \", salesperson[8]);

system(\"pause\");

return 0;

}

Javscript please, I need a pseudocode and flowchart. Use single subscripted array(s) to solve the following problem. A company pays its sales people on a commis
Javscript please, I need a pseudocode and flowchart. Use single subscripted array(s) to solve the following problem. A company pays its sales people on a commis
Javscript please, I need a pseudocode and flowchart. Use single subscripted array(s) to solve the following problem. A company pays its sales people on a commis

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site