+ 1

calculating wages

i need help to be able to calculate the wages of the employees entered. https://code.sololearn.com/cu9iXOyEOzPo/?ref=app

22nd Sep 2021, 3:34 PM
Bobby Dike
Bobby Dike - avatar
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!
22nd Sep 2021, 3:45 PM
Lothar
Lothar - avatar
22nd Sep 2021, 5:36 PM
Bobby Dike
Bobby Dike - avatar
+ 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.
22nd Sep 2021, 5:51 PM
Bobby Dike
Bobby Dike - avatar
22nd Sep 2021, 6:01 PM
Bobby Dike
Bobby Dike - avatar
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 .
22nd Sep 2021, 4:23 PM
Bobby Dike
Bobby Dike - avatar
0
Lothar , can you help me out with this?
22nd Sep 2021, 4:40 PM
Bobby Dike
Bobby Dike - avatar
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.
22nd Sep 2021, 5:00 PM
A͢J
A͢J - avatar
0
i have another problem
22nd Sep 2021, 5:37 PM
Bobby Dike
Bobby Dike - avatar
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
22nd Sep 2021, 5:49 PM
Bobby Dike
Bobby Dike - avatar
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
22nd Sep 2021, 5:58 PM
A͢J
A͢J - avatar
0
discussion before, part of refactoring with class Employee https://www.sololearn.com/Discuss/2887429/?ref=app
22nd Sep 2021, 6:37 PM
zemiak