(a) Use a one-dimensional array to solve the following problem: A company pays its sales people on a commission basis. The sales people 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 ¢5000, or a total of$650. Write a program (using an array of counters) that determines how many of the sales people earned salaries in each of the following ranges (assume that each sales person’s salary is truncated to an integer amount): 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
(b) Use a one-dimensional array to solve the following problem: Read in 20 numbers, each of which is between 10 and 100, inclusive. As each number is read, print it only if it is not a duplicate of a number already read. Use the smallest possible array to solve this problem.

Reverend Jim commented: lazy -3

Recommended Answers

All 2 Replies

We don't do homework. We'll help you when you're stuck but you'll need to show some effort first.
If you are stuck, post up what code you have done and explain the problem you're having.

I find it particularly annoying that not only do you expect us to do your homework for you but you can't even be bothered to ask. You just post the question and expect us to do the work for you. You get a downvote for your lack of effort.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.