Hi,
I have a small program to calculate the value of salary. I want to user to be able to enter more than one user using array and finally calculates the average salary of all users.
Here is the codeThanks in advancedCode:#include <iostream>#include <conio.h> using namespace std; int main() { const int months=3; double net_pay; string EmpName; string date_of_birth; int hours, dependents; cout<<"Please enter your name: " ; cin>>EmpName; cout<<"enter your birth date: "; cin>>date_of_birth; do { cout<<"How many hours you work everyday: (Please choose 8, 10 or 12 only): "; cin>>hours; } while(hours != 8 && hours != 10 && hours != 12); cout<< "How many children you have? "; cin>>dependents; if (0<dependents<10) { if(hours==8) { net_pay= months*300; } else if (hours==10) { net_pay= (months*300)+(5*dependents); } else if (hours==12) { net_pay= (months*400)+(10*dependents); } cout<<" Hello "<<EmpName<<"... Your Salary is "<<net_pay<<endl ; } else { cout<<" Please choose correct values"<<endl ; } getch(); return 0; }