Suppose a company has a number of salesmen, each with salesman-ID in the interval of ‘A’ to ‘Z’. When a salesman has sold for a specific amount, he sends his salesman-ID and the sales amount to the company Finance-Clerk immediately and the clerk stores the details. At the end of each day, the Finance-Clerk should summarize the sales and the bonus of each salesman. The bonus of the salesman will be computed as follows: • If the sales amount is less than or equal to 50000, the bonus is 10% of the sales amount. • If the sales amount is greater than 50000, the salesman will get bonus which is 10% of the first 50000 plus 15% of the amount exceeding 50000. (Eg. If the sales amount is 70000 then the bonus = 5000010%+2000015%) Write a C++ program to solve the above problem and help the Finance-Clerk. Sample Conversation and out put as follows:
like:- Enter the Salesman-ID : B //Morning 9.00 AM Enter the Sales: 27000 Exit (Y/N): N Enter the Salesman-ID : F Enter the Sales: 12000 Exit (Y/N): N Enter the Salesman-ID : K Enter the Sales: 68500 Exit (Y/N): N Enter the Salesman-ID : F Enter the Sales: 33000 Exit (Y/N): N Enter the Salesman-ID : X Enter the Sales: 13500 Exit (Y/N): N Enter the Salesman-ID : B Enter the Sales: 6400 Exit (Y/N): Y // Evening 5.00 PM Today Summary: Salesman-ID Sales_Amount Bonus B 33400.00 3340.00 F 45000.00 4500.00 K 68500.00 7775.00 X 13500.00 1350.00
Aucun commentaire:
Enregistrer un commentaire