i dont know how to write this code..anyone can help me ?? here are the question :

Write a complete program that calculates the wages of an employee for the month(hint : input from user includes year,month,time in/time out for each day in that month.).

monday-friday :first 8hrs,Rm50......add.hour RM10/hr.
saturday and sunday:RM20/hr

thank you..

Recommended Answers

All 3 Replies

i dont know how to write this code..anyone can help me ?? here are the question :

Write a complete program that calculates the wages of an employee for the month(hint : input from user includes year,month,time in/time out for each day in that month.).

monday-friday :first 8hrs,Rm50......add.hour RM10/hr.
saturday and sunday:RM20/hr

thank you..

Which bits do you know how to write? Try to get as far as you can, and post your attempt. If you're having trouble with the logic of the program, try working out the calculations step-by-step on paper from a human perspective - this might make it easier to think about what steps the program needs to do the same, and what variables & calculations are involved.

i think this question use if else command. but i dont know how to write the coding into c++. im new in c++. so, anyone please help me to solve this problem.

How about beginning with the basics of simply reading in the user input, then printing out what you read in.

So for example, you would print
on yyyy/mm/dd you worked from hh:mm to hh:mm

In the next pass through your program, you calculate hours worked from the two times
on yyyy/mm/dd you worked for hh hours


Keep progressing like that, then post what you've achieved when you get really stuck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.