Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

Need help finishing with this c++ project

$
0
0
I need help on how to get my program like it is. prompt: One large chemical company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9 percent of $5000, or a total of $650. Develop a C++ program that uses a while statement to input each salesperson’s gross sales for last week and calculates and displays that salesperson’s earnings. Process one salesperson’s figures at a time. Your program should have one member data named grossSales. Your program should have a constructor, a get and a set member function for the data. The result salaries must be displayed in 2 decimal places. Sample run: Enter sales in dollars:(-1 to end): 5000 //input Salary is : 650.00 //output Enter sales in dollars:(-1 to end): 5678 Salary is: 711.02 cpp: Code: --------- #include #include "Sales.h" using namespace std; int main() { double salary, sales; Sales mySales; //double commision=0.09;//rate given cout<<"Enter sales In dollar(-1 to end)"; cin>>sales; //input // write the loop to get more values while(sales!=-1) { } mySales.setGrossSales( sales ); salary = mySales.findSalary(); cout<<"Salary is "<

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images