Write a C program for a company that pays its salespeople on acommission basis.
ID: 3613457 • Letter: W
Question
Write a C program for a company that pays its salespeople on acommission basis. The salepeople receive $200 per week plus 9% oftheir gross sales for that week. For example, a salesperson, whosells $5000 worth of chemicals in a week receives $200 plus 9% of$5000, or a total of $650.Develop and implement a C program that will input eachsalepersons's gross sales for last week and
will calculate and display that salesperson's earnings. Process onesalesperson's figures at a time.
Here is how your input/output should be:
Entersales in dollars (-1 to end) : 5000.0
Salaryis: $650.00
(also, what UNIX commands would I use to compile and runthis C program?)
Explanation / Answer
please rate - thanks sorry- don't know UNIX #include #include int main() {float sales, salary; printf(" Enter sales in dollars (-1 to end) :"); scanf("%f",&sales); while(sales!=-1) {salary=200+sales*.09; printf(" Salary is: $%.2f ",salary); printf(" Enter sales in dollars (-1 to end) :"); scanf("%f",&sales); } getch(); return 0; }Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.