So for the Program, we have to build a program to calculate the average age and salary of the Personnel.
Here is my code:
#include <iostream>
using namespace std;
struct Personnel {
int average_Age;
float salary;
};
int main()
{
Personnel p1;
cout << "Enter age :";
cin >> p1.average_Age;
cout << "Enter salary:";
cin >> p1.salary;
int year = 0;
float Salary, tax ;
if (Salary <= 40000)
{
cout << "What is the Salary";
cin >> Salary
year = year + 1;
Salary = Salary+ year - tax;
}
}
where else can I go with my code or would you suggest I redo it all?
Aucun commentaire:
Enregistrer un commentaire