Please help Write a C program asks the user to alter the nam

Please help
Write a C++ program asks the user to alter the name, salary and total sales for the month of a sales person. Then, the program, calculates and prints the sales commission of the person. Sales commissions are calculated as follows: The program should then display the name. and total salary the salesperson will receive. total salary = salary + commission. Format your output to 2 decimal places. Example: Enter name, salary and total Sales: All 500 400 AH will receive 560.00 BD.

Solution

#include <iostream>
using namespace std;

int main(){
   double totalsalary=0.0, sales=0.0,commission=0.0;
   double salary=10000;
   char name;
cout<<\"Enter the name of the employe\";
cin>>name;
cout<<\"\ To calculate the commission\";

cout<<\"\ enetr sales points \"<<endl;
cin>>sales;

if (sales>=1 && sales<=100)
{
   commission = (sales*10)/100;

}else if(sales>100 && sales<=500){
   commission = (sales*15)/100;
}else if(sales>500){
   commission = (sales*20)/100;
}else {
cout<<\"invalid input\";
}
totalsalary = salary+commission;
cout<<name<<endl;
cout<<totalsalary<<endl;
cout<<commission<<endl;

   return name+totalsalary+commission;

}

Please help Write a C++ program asks the user to alter the name, salary and total sales for the month of a sales person. Then, the program, calculates and print

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site