it would be easier to just put the initial gallons read in above the while loop and then again at the bottom of the loop before the close brace
this would eliminate the need for break and for the extra comparison that quzah suggests
it would be easier to just put the initial gallons read in above the while loop and then again at the bottom of the loop before the close brace
this would eliminate the need for break and for the extra comparison that quzah suggests
Exactly. "A million different ways to fix this problem."
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
haha quzah you crakin me up over here
anyway ive done this program when learning C and belive me dont feel bad i really messed mine up worse then this. LOL but i wont put people here though my insanity
somthing to bear in mind also dont try and enter a b or another char for any of your program otherwise it will spin into non ending loop of death or worse on a MS machine :P