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
Compared to other forms of communication, texting does not offer as many message cues.
solmaris [256]
The correct answer is true.
3 0
2 years ago
Assume the user types in 7 and 10. What is output by the following?
Marianna [84]

Answer:

Enter a number: 7

Enter a number: 10

Traceback (most recent call last):

 File "main.py", line 3, in <module>

   print (numi + num2)

NameError: name 'numi' is not defined

Explanation:

The typo in the print statement causes a run-time error, where obviously num1+num2 was expected, and an output of 17.

3 0
3 years ago
How do the following improve security <br> User Id <br> Password<br> Encryption
natima [27]
I would say password.
5 0
3 years ago
Read 2 more answers
100 POINTS
agasfer [191]

Answer:

i'm just a kid ku ku ku ku ku ku ku ku ku ku ku ku

6 0
2 years ago
Images, symbols, and diagrams are types of
kifflom [539]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is :

Graphics

Because Graphics are the visual representation of information without text. Images, symbols, and diagrams are types of graphics. These graphics can be used in presentations to present information visually.

While other options are not correct because:

Art objects are some images or painting that is the artistic creation of aesthetic value. While graphs are the visual presentation of data and there are different presentation objects in PowerPoint such as images, symbols, text, and diagrams, etc. But it is noted that images, symbols, and diagram are not types of presentation objects but it is a type of graphics elements/objects.

4 0
3 years ago
Other questions:
  • You can pin applications to which two areas?
    11·1 answer
  • Choosing firm goals for your business
    7·2 answers
  • In 2-3 paragraphs, identify at least two ways technology and innovation have affected global economic competition. Provide a spe
    5·1 answer
  • What tab must you click on to view any previously read messages from instructors in the message center?
    14·2 answers
  • Oracion con punto focal​
    6·1 answer
  • The reason the Code uses the term ____ instead of motor is that, in many instances, the motor is inside an enclosure and is out
    12·2 answers
  • Prewritten, commercially available sets of software programs that eliminate the need for a firm to write its own software progra
    7·1 answer
  • Write a valid HTML + Python page that will count numbered from 1 to 1,000,000?​
    9·1 answer
  • _____ is rampant with bugs and shortcomings because most programmers do not know how or do not take the time to incorporate secu
    14·1 answer
  • 1. Write a statement that opens the file Customers.dat as a random access file for both reading and writing.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!