It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming C and C++ Forum

how to solve it ?

how to solve it ?

Postby cooop on Wed Jul 15, 2009 11:17 am

how to slveit without using swicth statment ?

A baby sitter charges $1.50 per hour until 9:00 pm (while the kids are still up), $1.00 per hour between 9:00 pm and midnight, and $1.25 per hour after midnight (since late night baby sitting interferes with morning classes).
Write a program that reads the sitter's starting time in hours and minutes and the ending time in hours and minutes and then computes the sitter's fee. Assume all times are between 6:00 pm and 6:00 am; hours should be entered as numbers on a 12-hour clock, so that hour 3 should be considered as 3:00 am and hour 8 should be considered as 8:00 pm. Hours outside the range 1 to 12 should be considered invalid.
[Note: You may not use a 24 hour clock for this problem. Also, times must be given in hours and minutes (as two nonnegative integer values).]
cooop
 
Posts: 1
Joined: Wed Jul 15, 2009 11:11 am

Re: how to solve it ?

Postby mimkst on Mon Jul 20, 2009 10:57 am

Hi again cooop , how r u?

i think if you visit this site they would help you :)

q8programmer.com

take care :P
mimkst
 
Posts: 1
Joined: Mon Jul 20, 2009 10:50 am


Who is online

Users browsing this forum: No registered users and 0 guests