I need help, I am a beginner in C++ programming.
I have been given an assignment and I tried several times but cant do it and need help
this is the question and what I have done so far:
/*
Q1. Develop a C++ program that will determine the gross pay for each of several employees.
The company pays “straight-time” for the first 30 hours worked by each employee and pays
“time-and-a-half” (thus $10.5) for all hours worked in excess of 30 hours. You are given a list of
the employees of the company, the number of hours each employee worked last week and the
hourly rate of each employee. Your program should input this information for each employee
and should determine and display the employee's gross pay. The Basic rate for the 30 hours is
$500.
Employee Name Number of hours worked
Asamoah Billy 40
Vivian Lawrence 65
Kofi Nti 88
Nana Anane 70
Akua Jane 50
Papa Gyan 90
Cecelia Quaye 78
*/
#include <iostream>
using namespace std;
int main()
{
string EmployeeName[7]={"Asamoah Billy", "Vivian Lawrence", "Kofi Nti", "Nana Anane", "Akua Jane", "Papa Gyan", "Cecelia Quaye"};
int Number_of_hours_worked;
float overtime;
int work_limit;
double salary;
double Gross_Pay;
work_limit=30;
salary= 500;
overtime= 10.5;
Gross_Pay=(salary + overtime);
EmployeeName=Asamoah Billy;
Number_of_hours_worked=40;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Vivian Lawrence;
Number_of_hours_worked=65;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Kofi Nti;
Number_of_hours_worked=88;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Nana Anane;
Number_of_hours_worked=70;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Akua Jane;
Number_of_hours_worked=50;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Papa Gyan;
Number_of_hours_worked=90;
if (work_limit>30){Gross_Pay = salary + overtime};
EmployeeName=Cecelia Quaye;
Number_of_hours_worked=78;
if (work_limit>30){Gross_Pay = salary + overtime};
cout << "Employee Name\t" << "Number of hours worked\t" << "Gross Pay" <<endl;
return;
}