943,442 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1861
  • C++ RSS
Feb 18th, 2005
0

My Program runs but not correctly

Expand Post »
I fixed my program from the previous complaint and I got it to run. Now my problem is that it won't run correctly. Can you help me?
Attached Files
File Type: cpp Cell Phone Bill homework due 2-18-05.cpp (2.9 KB, 20 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ANRCCC is offline Offline
5 posts
since Feb 2005
Feb 18th, 2005
0

Re: My Program runs but not correctly

1. Don't post twice the same question.
2. You should have posted the code (it's not so big)
3. Some errors (not compiler, but logical errors):
C++ Syntax (Toggle Plain Text)
  1. if (plan == 'A')
  2. {
  3. BASE_PRICEA;
  4. }
What's this??
C++ Syntax (Toggle Plain Text)
  1. else (plan == 'A' && weekday <= 250);
  2. {
  3. cout << "No weekday overages" << endl;
  4. }
I think you forgot an if:
C++ Syntax (Toggle Plain Text)
  1. else if (plan == 'A' && weekday <= 250)
and, after if don't put a semicolon.
Reputation Points: 17
Solved Threads: 9
Posting Whiz in Training
frrossk is offline Offline
220 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: sorry I'm so dumb at this
Next Thread in C++ Forum Timeline: undefined reference errors when using C++ Sockets Library





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC