code for a program to display a payroll in C++ to calculate the salary and bonus % show the name, age and rank.

You want somebody to code that for you, something that can take a few hours. Ask what you need help in coding inside the code, also show your coding. Start with a name. You typed a paragraph and want something the size of an essay.

payroll

Certainly! Here's an example program in C++ that calculates the salary and bonus percentage and displays the name, age, and rank of an employee:

```cpp
#include <iostream>
#include <string>

using namespace std;

class Employee {
private:
string name;
int age;
string rank;
double salary;
double bonusPercentage;

public:
// Constructor
Employee(string n, int a, string r) {
name = n;
age = a;
rank = r;
salary = 0.0;
bonusPercentage = 0.0;
}

// Setters
void setSalary(double s) {
salary = s;
}

void setBonusPercentage(double b) {
bonusPercentage = b;
}

// Getters
string getName() {
return name;
}

int getAge() {
return age;
}

string getRank() {
return rank;
}

double getSalary() {
return salary;
}

double getBonusPercentage() {
return bonusPercentage;
}

// Function to calculate salary with bonus
double calculateSalaryWithBonus() {
return salary + (salary * bonusPercentage / 100);
}
};

int main() {
string name;
int age;
string rank;
double salary;
double bonusPercentage;

cout << "Enter name: ";
getline(cin, name);

cout << "Enter age: ";
cin >> age;

cout << "Enter rank: ";
cin.ignore();
getline(cin, rank);

cout << "Enter salary: ";
cin >> salary;

cout << "Enter bonus percentage: ";
cin >> bonusPercentage;

// Create an instance of Employee class
Employee employee(name, age, rank);

// Set salary and bonus percentage
employee.setSalary(salary);
employee.setBonusPercentage(bonusPercentage);

// Display employee details
cout << "\nEmployee Details:" << endl;
cout << "Name: " << employee.getName() << endl;
cout << "Age: " << employee.getAge() << endl;
cout << "Rank: " << employee.getRank() << endl;

// Calculate and display salary with bonus
cout << "Salary with Bonus: $" << employee.calculateSalaryWithBonus() << endl;

return 0;
}
```

To run this program, you can follow these steps:
1. Open a text editor and paste the code into a new file.
2. Save the file with a `.cpp` extension, for example, `payroll.cpp`.
3. Open a C++ compiler or integrated development environment (IDE) like Code::Blocks, Visual Studio, or Xcode.
4. Create a new project and add the `payroll.cpp` file to the project.
5. Build and run the program.

Once the program runs, it will prompt you to enter the employee's name, age, rank, salary, and bonus percentage. After entering the values, it will calculate the salary with the bonus, and display the employee details along with the final salary.