76 820
Assignments Done
Successfully Done
In June 2019

Answer to Question #7675 in C++ for ken

Question #7675
One large company pays its salesperson on a commission basis.The salesperson each receive 200 per week plus 9 percent of their gross sales for that week.Develop a c++ program that uses a while statement to input each salespersons gross sales for last week and calculates and displays that salespersons earnings.
Expert's answer


int main()
& float sales,earn;
& char ch;
& while(1)
& {
& cout<<"\nEnter the salesman's sales->";
& cin>>sales;
& cout<<setprecision(6);
& earn=200+0.09*sales;
& cout<<"\nHis earning is::";
& cout<<earn;
& cout<<"\nWant to continue?(Press Y or N)->";
& fflush(stdin);
& ch=getche();
& if(ch=='N'||ch=='n')
& {
cout<<"\n*********THANK YOU********\n";
& }
& }
& return 0;

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 first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions