(a) Use a one-dimensional array to solve the following problem: A company pays its

salespeople 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.

Project 4

Write a program that plays “guess the number” as follows: Your program chooses the number

to be guessed by selecting an Integer at random in the range 1–1000. The program then

displays the following text in a label:

“I have a number between 1 and 1000--can you guess my number? Please

enter your first guess”.

A TextBox

## Recommended Answers

Jump to PostWe 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.

## All 2 Replies

ddanbe
2,724
Professional Procrastinator
Featured Poster

Reverend Jim
3,385
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster

Be a part of the DaniWeb community

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