Switch statement, long distance call

Write a program with switch statement that computes the cost of long distance calls.The cost of call is determined according to the following schedule.

Last edited on
if ((start_time >= 8) || (start_time <= 18))


This will always be true.

You are checking to see if start_time is greater than 8... OR if it is less than 18. Any number will be one of those.

You probably want and instead of or.


Note to self: Never help this guy again.
Last edited on
Topic archived. No new replies allowed.