|
If you compare that example to what I'm showing you, you almost have the same level..
They use using std::cout etc. to tell when ever you use cout it's the one from the std::i/o class.. I use using namespace std to tell it, when ever something like cout/cin/fixed/showpoint dosn't fit anything it is assumed to come from the std::i/o class.
When they declare variables, they assign a value to them, like I do to mine..
They ask the user a few questions, and reads the response like I do.. They use the ignore() function, to make sure teh user dosn't type in a lot of garbage to find a loop hole in the code, I'm pretty ignorant to that, since this is a beginners class..
They display the results to the user, this part I'm hoping you are capable of compleeting yourself..
All in all, what I can see as a difference, is that you havn't learned loops yet, and I'm usign the while() loop to detect any unwanted input, but apart from that, the level seems about right.
|