Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
calculate the amount of federal tax
Author Message
w0lv3rin3

Posted: Fri Mar 28, 2003 10:18 am   Post subject: calculate the amount of federal tax

1. Write pseudo-code and a real program that will calculate the amount of federal tax you will pay. Have the program ask the user for the amount of money they made this year. The program then will calculate a 17% tax rate on the first \$27,500 then 24% on the next \$27,500 and 29% on the rest. For example, if the amount of money made in one year is \$65000, then since \$65000>\$27,500 the amount of tax on the first \$27,500 is:

\$27500*.17 (.17 is 17%) = \$4675.00

Now, we find out the amount of tax on the next \$27500.

Since \$65000 - \$27500 = \$35000 and this is greater than \$27500 there will be:

\$27500 *.24 = \$6600.00

Finally, the amount of money taxed at 29% will be \$65000 - \$27500-\$27500=\$10000

So the amount of tax on \$10000 is:

\$10000*.29 = \$2900

Therefore the total amount of tax is: \$4675 + \$6600+\$2900=\$14175.00

Have your program be able to figure the tax for any amount entered. Make sure that you indent your if statements and use enough comments throughout the program to explain what each part is doing.

5 marks Pseudo-code
10 marks for the actual program (3 for style, 2 for comments, 5 for how well the program works)

2. Write a program that will read in 5 positive integers and then out put the lowest number of the five entered. (No pseudo-code required) (10 marks for the program - (3 for style, 2 for comments, 5 for how well the program works)
3. Do the same as the above question but output the highest number of the five (2 marks)
4. OPTIONAL: Have the computer output the lowest and highest of 5 numbers entered (5 marks)

Dan

Posted: Fri Mar 28, 2003 12:05 pm   Post subject: (No subject)

ah, we are not going to do your wrok for you. is there a pricalrualer part of wirteing the progmae you are stuck on?

the 1st part whode be sotming like this:

 code: var money: int put "how much money did you make this year?" get money

after this you will need some if's to figer out how much money there is and how much to tax them.
w0lv3rin3

Posted: Fri Mar 28, 2003 12:20 pm   Post subject: (No subject)

naw its ok, i was a school, a school assignment, just got lazy to do it, but took me 5 mins to do, for question num 1, want me to post it here???

small code
Asok

Posted: Fri Mar 28, 2003 6:20 pm   Post subject: (No subject)