+ 1
calculating wages
i need help to be able to calculate the wages of the employees entered. https://code.sololearn.com/cu9iXOyEOzPo/?ref=app
11 Antworten
+ 7
Bobby Dike ,
can you please describe a bit more detailled what kind of problems you are incounterd?
maybe also an input sample and the expected output?
thanks!
+ 2
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ ,
thanks
+ 1
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ ,
its printing immediately after and still moving to the next line instead of giving space.
+ 1
okay thanks
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
0
Lothar
Enter the number of employees: 3
Employee(E): Stan Alan Sam
ID: 34 23 45
Hours for E: 4 6 2
Payrate of E: 45 20 50
Wages: 180 120 100
(the wages is calculated by payrate * hours and arranged the same way).
This is what i want it to look like but i have a problem using %d and %s and %f to align the numbers and employee names like that. And, the part of the program for calculating wages is not working too .
0
Lothar ,
can you help me out with this?
0
Bobby Dike
There are some mistakes in calculating wages. Here is working solution.
https://code.sololearn.com/cazS7m9iul3Q/?ref=app
One more thing I didn't get why did you take working hours in double, this should be in int.
0
i have another problem
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟
This is my current output:
Employee(E) : Stan
StanReah
ReahNico
Nico
ID of E : 23
2334
3445
45
Hours for E : 3
32
23
3
Payrate(per) : 12
12.034
34.045
45.0
Wages for E: 36.0 68.0 135.0
0
Bobby Dike
Here is another solution which will give you perfect output.
In my case inputs should be like this:
3
AJ 2 4 5
PK 5 6 7
KL 8 9 3
https://code.sololearn.com/cfXzaLDTMoCe/?ref=app
0
discussion before, part of refactoring with class Employee
https://www.sololearn.com/Discuss/2887429/?ref=app