hi...i would be very greatful if someone could help me in solving this problem. i am very new to c language and only familiar to "printf" and "scanf".

Problem:

Write a program that calculates the wages of an employee for the month.(Input from user must include YEAR,MONTH,TIME IN & TIME OUT for each day in the month)

The wages rate is:

Monday-Friday ---    first 8 hours:$50
                              additional hour:$10/hour

Saturday/Sunday--- $20/hour

I would be very much obliged if somebody could help me in this.Thank You.

Yes, $10/hour, and first 8 hours $50 additional, would be OK for me :)

But seriously, use fgets, not scanf, for input.

Yes, $10/hour, and first 8 hours $50 additional, would be OK for me :)

But seriously, use fgets, not scanf, for input.

thanx for ur reply..but i am not familiar with fgets function.please help.

>>thanx for ur reply..but i am not familiar with fgets function.please help.

Look it up in your text book or online. You can't learn to program if you have to ask us for every keyword and function you want to use. You can use google to find all standard C functions, like this

google:  man fgets <Enter key>

You can also read some of the other threads here -- there are lots of examples using fgets().

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.