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)

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 4 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search:
The text passage contains a series of programming assignment questions, one of which includes a detailed mathematical problem related to calculating federal tax.
multiple_questions

1. the first question is a detailed mathematical problem that requires writing a program to calculate federal tax based on different tax brackets. the problem is fully described, and an example calculation is provided.
2. the second question asks for a program to read in 5 positive integers and output the lowest number.
3. the third question is similar to the second but asks for the highest number instead.
4. the fourth question is optional and asks for a program to output both the lowest and highest of 5 numbers entered.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
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)

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 4 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search:
user
The text passage contains a series of programming assignment questions, one of which includes a detailed mathematical problem related to calculating federal tax.

TYPE: MULTIPLE_QUESTIONS

1. The first question is a detailed mathematical problem that requires writing a program to calculate federal tax based on different tax brackets. The problem is fully described, and an example calculation is provided.
2. The second question asks for a program to read in 5 positive integers and output the lowest number.
3. The third question is similar to the second but asks for the highest number instead.
4. The fourth question is optional and asks for a program to output both the lowest and highest of 5 numbers entered.