Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A salesman works on commission. When asked how much he earns on a sale, he explains it as follows: All my sale prices are
A salesman works on commission. When asked how much he earns on a sale, he explains it as follows: "All my sale prices are whole numbers. I like whole numbers, and never settle for any fractions. If the sale amount is divisible by seven, my commision is two sevenths of the sale amount. If the sale amount is divisible by five, my commission is one fifth of the sale amount. If the sale amount is divisible by eleven, my commission is three elevenths of the sale amount. If two or more of the above happen, I my commission is the largest possible, but I can not get two commissions on one sale. And if none of the above happen, I get no commission at all." When asked how much money he made last year, he says: "Well, I never know because I spend them as soon as I earn them. But I remember this: The largest sale amount I had was 1000, and there was only one of that. There were 2 sales of 999 each. 3 sales of 998 each; and this went just like this all the way down. The least sales amount I had was 550, and I can not remember how many happened, but I am sure you can figure that out, being a computer scientist and everything." Question Write a Java program to compute the total commission the salesman earned in the last year. Activate Wi
Step by Step Solution
★★★★★
3.47 Rating (160 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started