![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Feb 2010
Posts: 19
Rep Power: 0
![]() |
Re: Newbie Needs help with First Program
I am interest in the result of this question , it is interesting.
__________________
sky programmer |
|
|
|
|
|
#12 |
|
Hobbyist & CS Student
|
Re: Newbie Needs help with First Program
c++ Syntax (Toggle Plain Text)
__________________
Looking for a good Linear Programming e-book or Assembler e-book. |
|
|
|
|
|
#13 |
|
Trying to be a Real Coder
|
Re: Newbie Needs help with First Program
I've tried the following code. Program runs as expected.
cpp Syntax (Toggle Plain Text)
Hope that helps. Result :
__________________
just a drop of dew in the morning |
|
|
|
|
|
#14 |
|
Newbie
Join Date: Feb 2010
Posts: 6
Rep Power: 0
![]() |
Re: Newbie Needs help with First Program
Here's what I have based on what we've learned so far. Doesn't compile and says "expected primary expression before 'int' on line 11. Any ideas? BTW...how do list code with the option to toggle plain text?
...and thanks a bunch!!! #include <iostream>Last edited by ericsurf; Mar 1st, 2010 at 2:06 PM. Reason: forgot to add some things |
|
|
|
|
|
#15 | ||
|
Trying to be a Real Coder
|
Re: Newbie Needs help with First Program
I dunno where line 11.
![]() I think, Error occured in following code. Quote:
cpp Syntax (Toggle Plain Text)
You may be able to try my program (My previous post). Quote:
For C++ language, you add ='cpp' or ='c++' after CODE, [code='cpp' ] [/CODE ]
__________________
just a drop of dew in the morning |
||
|
|
|
|
|
#16 |
|
Newbie
Join Date: Feb 2010
Posts: 6
Rep Power: 0
![]() |
Re: Newbie Needs help with First Program
Thanks so much for all the help folks! It turns out I had 3 small errors
1. White spaces when I declared some of my int variables. 2. I didn't change the variable "change" from a double to an integer after multiplying by 100 (convert to pennies) 3. Had several "<< " pointing in the wrong direction in the cout at the end. Here's what gave me credit for the project: cpp Syntax (Toggle Plain Text)
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| Newbie: Masm32 program that beeps 6 times | Johnny5 | Assembly | 2 | Jun 12th, 2005 10:49 AM |
| Newbie needs help badly with his C++ program | jamal227 | C++ | 2 | Feb 19th, 2005 10:52 AM |