0

Please i want to find the grosspay of some workers and do you mind helping

https://code.sololearn.com/cCJKix4K5JZ9/?ref=app

10th Nov 2019, 1:01 AM
Immanuel Immanuel
Immanuel Immanuel - avatar
5 ответов
+ 1
May you be called blessed
10th Nov 2019, 12:57 PM
Immanuel Immanuel
Immanuel Immanuel - avatar
+ 1
Thanks for your kind words too .. I will try and learn it well.. But i will love it if you could tutor me and give me challenges ..
10th Nov 2019, 12:58 PM
Immanuel Immanuel
Immanuel Immanuel - avatar
0
Immanuel Immanuel run this #include <iostream> using namespace std; int main() { int workHours[7] = {40,65,88,39,50,24,78}; int fixedpay=500; //pay for 30 hours work int excessHours; double grossPay; for(int x=0;x<7;x++){ excessHours=workHours[x]-30; grossPay=fixedpay+excessHours*10.5; cout<<grossPay<<endl; } return 0; }
10th Nov 2019, 1:30 AM
Avinesh
Avinesh - avatar
0
https://code.sololearn.com/c5p63P2m5wQm/?ref=app It worked perfectly Thanks for your good work. But i want to loop the names of the workers with their corresponding pay .. Please check whats wrong with that .
10th Nov 2019, 2:18 AM
Immanuel Immanuel
Immanuel Immanuel - avatar
0
#include <iostream> using namespace std; int main() { int workHours[7]={40,65,88,39,50,24,78}; string workers [7]={"Billy","Lawrence","Nti","Anane","Jane","Gyan","Quaye"}; int fixedPay = 500; //Pay for 30 hours work int excessHours; double grosspay; for(int j=0;j<7;j++){ excessHours =workHours[j]-30; grosspay =fixedPay + excessHours*10.5; cout<<workers[j]+" gets " <<'
#x27;<<grosspay<<endl; } return 0; } Immanuel Immanuel Learn the language well then practice problems.
10th Nov 2019, 4:18 AM
Avinesh
Avinesh - avatar