Hello everyone! My names Mary and I'm very new to java and computer programming in general, taking my first class at school right now. We have been asked to write a java program that calculates federal taxes. It has to calculate the appropriate tax for each amount and keep a total of all the taxes. It has to display the tax for each income then show the sum at the end. I have to use a -1 number to tell the program to end.
I think that I could do this if the taxrate was one number but the tricky part for me but probably the easy part for you to understand is that a person pays 10% for the first 15k..if it is over 15k they pay 10% for the first 15k and 15% for the next 45k. If it is over 60k they pay what I just said and 33% for the income over 33%.
Can someone please help me figure this out! I have no idea how to incorporate that last part so if someone could show me how to do this program I would greatly appreciate it! And please explain a little bit what your doing so I can learn from it...I know I have to use a while loop to end the program with a negative number which I think I know how to do. But I also know I have to use a if statement and constants which I do not understand how to do. Thankyouuuu