1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Jlenok [28]
3 years ago
6

Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeopl

e receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who grosses $5,000 in sales in a week receives $200 plus 9% of $5,000, or a total of $650. Write an app (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson's salary is an integer). a) $200–299
b) $300–399
c) $400–499
d) $500–599
e) $600–699
f) $700–799
g) $800–899
h) $900–999
i) $1000 and over
Summarize the results in tabular format.
Computers and Technology
1 answer:
inysia [295]3 years ago
6 0

Answer: Provided in the explanation section

Explanation:

import java.util.Scanner;

public class commission

{

   public static void main(String[] args) {

      Scanner input = new Scanner(System.in);

        int totals[]={0,0,0,0,0,0,0,0,0};          

      int n,sales,i,index;

       double salary;

        System.out.print("how many salesmen do you have? ");                          

      n=input.nextInt();

        for(i=1;i<=n;i++)

           {System.out.print("Salesman "+i+" enter sales: ");

            sales=input.nextInt();

            salary=200+(int)(.09*sales);

               System.out.printf("Salary=$%.2f\n",salary);

            index=(int)salary/100-2;

            if(index>8)

                index=8;

            totals[index]++;

            }

        System.out.println("SUMMARY\nSALES\t\tCOUNT");

        for(i=0;i<8;i++)

           System.out.println("$"+(i*100+200)+"-"+(i*100+299)+"\t"+totals[i]);

        System.out.println("$1000 and over\t"+totals[i]);

       }                                

   }

 

cheers i  hope this helped !!      

You might be interested in
Draw a flowchart that solve the problem of calculating the average of 5 numbers.
KatRina [158]

Answer:

Draw a flowchart that solve the problem of calculating the Area of circle

Pie x r x2

Explanation:

3 0
2 years ago
Server virtualization in windows server 2012 r2 is based on a module called the
alexgriva [62]
<span>Server virtualization in windows server 2012 r2 is based on a module called the</span> hypervisor.
3 0
3 years ago
Create a Double complementary or tetradic colors (are a set of two complementary pairs of colors that form a rectangle on the co
hjlf

Answer:

(Remember, two colors are complementary if they are opposite each other ... colors are connected on the color wheel they form a rectangle.

Explanation:

best one i could find if worng am verys very sorry.

4 0
2 years ago
Read 2 more answers
Which is a feature of audio editing software?
riadik2000 [5.3K]
D. It is used to add sound effects.
Hope this helps!
5 0
3 years ago
Read 2 more answers
What is the nearest inhabited area to the amazon rainforest
TEA [102]
There are inhabited areas INSIDE the Amazon Rainforest. Many primitive tribes with little to no contact of the outside world live in remote areas of the rainforest, but the closest major city to the rainforest (also inside) is Manaus, Brazil.
4 0
3 years ago
Other questions:
  • In three to five sentences, explain how you would insert graphics using your word-processing software.
    7·2 answers
  • dentify the type of observational study​ (cross-sectional, retrospective, or​ prospective) described below. A research company u
    5·1 answer
  • What is Administrator windows 10
    8·1 answer
  • rray testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cred
    5·1 answer
  • A runtime error is usually the result of:
    9·1 answer
  • Describe the importance of human interaction in a computing system.
    14·2 answers
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • Select the correct answer from each drop-down menu.
    5·2 answers
  • What is geolocation?
    8·1 answer
  • Which combining form is spelled incorrectly? group of answer choices gynic/o carcin/o nephr/o laryng/o
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!