I'm reading your post and I can't really get what the problem is, especially with the decimal.. The reminder you can find using the % operator. More information and details you can find here: http://www.intap.net/~drw/cpp/cpp03_04.htm
freemind
Junior Poster in Training
62 posts since Jun 2005
Reputation Points: 10
Solved Threads: 1
Many GUI programs don't recognize input as anything but strings. They validate the string input and then convert the string input into a type that is appropriate for calculations, do the calculations, then display the report again as a string. If that's the way your system works, then there are several options including strtod(), atoi(), stringstreams, sprintf(), etc. to perform the conversions once user has provided original input.
Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396
can anybdy help on this question......write a program that uses a for statement to calculate and print the average of several integers. assume the last value read is the sentinel 9999. a typical input sequence might be.
10.....8......11.....7.....9.......9999
why are you hijacking this thread? create your own new thread. :(
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343