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]
4 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]4 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
Additional rows and columns are inserted into a table using the
Paladinen [302]
The Option D , Table Tools Insert
6 0
3 years ago
write a function named list_total that accepts a list as an argument (assume the list contains integers) and returns the cumulat
lutik1710 [3]

Answer:

def listSum(mylist):

  sum =0

  for item in range(0,len(mylist)):

      sum=sum+mylist[item]

  print(sum)

Explanation:

Using the Python programming language, I defined a function as listSum that accepts a list as a parameter and returns the sum of the elements in the list.

The most important logic here is defining the range of elements in the list not to exceed the length of the list using the len function. Then using a for statement, we loop through each element and add them up to a sum variable initially assigned the value of 0.

3 0
3 years ago
A Uniform Resource Locator (URL) consists of three separate parts: network protocol, host, and web browser.
FrozenT [24]
That is false. are you doing it on a computer course.                                             <span />
3 0
4 years ago
Read 2 more answers
g Given a 5 by 5 matrix of all positive values, write a program to find and display the greatest product of the 2 adjacent value
Rom4ik [11]

Answer:

Check the explanation

Explanation:

% iterate through each column (outer loop) , then iterate rows-1 (inner loop)

%take product of adjacent rows

mat = input('enter 5 by 5 matrix : ');

[R,C] = size(mat);

max_prod =0;

for c =[1:C]

for r=[1:(R-1)]

temp = mat(r,c)*mat((r+1),c);

if max_prod<temp

max_prod=temp;

end

end

end

fprintf('Greatest product : %i\n', max_prod)

Kindly check the output in the attached image below.

7 0
3 years ago
If you’re storing some personal information like Debit/Credit card numbers or Passwords etc, on different sites for running you’
nata0808 [166]

Answer:

cookies are stored on client side.

A hacker would need access to your computer, either by physically reading the cookie data or by means of cross-site scripting.

Other than that, cookies should not contain passwords or credit card numbers, just things like preferences or session identifiers.

3 0
3 years ago
Other questions:
  • Your friend, Isabella, is having difficulties remembering the names of different buttons on the Ribbon. Which of the following f
    6·1 answer
  • For which is a chart Legend used
    5·2 answers
  • What are the 6 external parts of a computer system
    5·1 answer
  • Please help!
    15·1 answer
  • Consider a disk with the following characteristics (these are not parameters of any particular disk unit): block size B 512 byte
    8·1 answer
  • Assume the existence of a BankAccount class with a constructor that accepts two parameters: a string for the account holder's na
    14·1 answer
  • A malicious user in your organization was able to use the Trinity Rescue Kit to change the password on a department manager's co
    7·1 answer
  • Which are examples of digital video? Choose all that apply.
    6·2 answers
  • True or false: Concurrent validation is more time consuming to measure than predictive validation because it involves a wait per
    13·1 answer
  • A manager suspects that one of his team members has been fraudulently accessing confidential and sensitive information and breac
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!