cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Switch statement, long distance call
Switch statement, long distance call
Mar 7, 2015 at 8:55pm UTC
joeaswe1
(25)
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
Mar 7, 2015 at 9:08pm UTC
Mar 7, 2015 at 9:05pm UTC
Disch
(13742)
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
Mar 7, 2015 at 9:14pm UTC
Topic archived. No new replies allowed.