![]() |
|
#1
|
|||
|
|||
something simple (I think)I'm in my second week of my first year of C++ and I'm doing what I imagine is a simple assignment. I'm inputing this:
CPP / C++ / C Code:
and the errors I'm getting are these. Among other things, I don't believe I'm using the "ceil" thing right, but I'm supposed to take the total hours from being parked in a garage, round up to the next hour, and calculate total charge plus tax. It's 2.50 an hour, and if even 1 minute of the next hour is used, the charge is for the whole hour, so that 3hrs and 1 minute is charged 4 hours. My errors are these: Code:
Last edited by LuciWiz : 22-Jan-2007 at 01:42.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
|||
|
|||
Re: something simple (I think)My errors went away when I dropped the dialogue portion that used calculated values below the area where I calculated those values. Then I had to use cout << fixed; and cout << setprecision(2); and after that it worked perfectly.
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| i need help with a simple program!! | alfie27 | CPP / C++ Forum | 1 | 06-Oct-2006 21:29 |
| my 1st simple program, 3 slight problems. | skizer | CPP / C++ Forum | 11 | 07-Feb-2006 15:31 |
| UpdateData - simple MFC project | kobycool | MS Visual C++ / MFC Forum | 3 | 23-Oct-2005 02:45 |
| Simple Calculator Application | MOHAMMEDALI1989 | Java Forum | 1 | 06-Oct-2005 17:00 |
| Just need one simple example or link to such example | Doggonit | MySQL / PHP Forum | 2 | 31-Jul-2005 18:39 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The