Hmm so maybe I'd be better off using a sentinel like "9999" to quit... I'm a beginner as I've mentioned in previous posts and stringstream isn't familiar to me.
Or would it be possible to enter a...
Type: Posts; User: Bnorman
Hmm so maybe I'd be better off using a sentinel like "9999" to quit... I'm a beginner as I've mentioned in previous posts and stringstream isn't familiar to me.
Or would it be possible to enter a...
Is there a way in C++ to validate user data for lack of a better term?
For instance I want to write a program that asks a user for numeric input do some calculations on that data and then ask if...
Thanks Rdast... you must have posted while I was still trying to figure out what to say haha!!
I'll put in a good word with Santa for everyone, really appreciate the discussion and suggestion.......
Right on... Thanks to everyone for their input! I'm still working on it and thinking in pseudo code it might be
if income >= high end of tax bracket 1 apply the first tax rate and add to ttlTax...
Yea I am sorry I've been trying to use very basic examples of what I am trying to accomplish. I think I am lacking in the explanation of the problem and I apologize...
In a nutshell there are 4...
Thanks for the reply, I do have the program written and am just trying to get that last part ... I am trying to figure out how to solve the issue of the tax rate rising through the different...
Guess I'm just not seeing it then... I am very much a beginner so bare with me :)
To give a full example say you input $70,000 as your income and the tax bracketts are:
10% for up to $15,100...
Thanks I've got that... but the problem I have is that the tax is calculated over different brackets
For say 2000 you calculate the tax on the first 500 and then the next 500 is at a higher rate...
I'm a beginner C++ coder having seen most of the code for the very first time over the past few weeks, just to give an idea of my expertise.
In my class we were given the problem to write a...
Ah ok... I did not know that... I was only familiar with substr being that it's in the chapter on strings in my textbook. So I was trying to figure out how to use it to get the next character in the...
Hmm in your code wouldn't "i" be an number value and not a string or char? so it would never pass a "t" to case 't' for output would it?
I was thinking
string ch; //hold the single characters...
Is that to say find the length () and then just use a loop to increment until the end of the string is reached? Again I'm a beginner so I am having to look through my text book for something I think...
New to C ++ programming have a course in it this semester... I am curious and I don't see it in my text, if there is a way to read the next character in a string?
Suppose the user enters a string...