Answer to Question #7539 in Java | JSP | JSF for Prezy

Question #7539
Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. the salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9% of the $5000, or a total of $650. Write an application (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 in truncated to an integer amount):
750, 1200, 5000, 7575, 10000, 9250, 12500, 3560, and 4800.
Expert's answer
public class Question7539 {
static int[] Salary = {750, 1200, 5000, 7575, 10000, 9250, 12500, 3560, 4800};
public static void main(String[] args) {
for(int i=0; i<Salary.length;i++)
System.out.println((i+1)+": "+(200+0.09*Salary[i])+"$");

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be the first!

Leave a comment

Ask Your question

New on Blog