Write an algorithm of value in tax using pseudocode, Data Structure & Algorithms

A town contains a total of 5000 houses. Every house owner has to pay tax based on value of the house. Houses over $200 000 pay 2% of their value in tax, houses over $100 000 pay 1.5% of their value in tax and houses over $50 000 pay 1% of their value in tax. All others pay no tax. Write an algorithm to solve this problem using pseudocode.

for count = 1 to5000

input house

if house > 50 000 then tax = house * 0.01

else if house > 100 000 then tax = house * 0.015

else if house > 200 000 then tax = house * 0.02

else tax = 0

print tax

next

 

Notes: (1) a while loop or a repeatloop would have worked just as well

   (2) The use of endif isn't essential in the pseudocode

 For illustration,

count = 0

while count < 5001

input house

if house > 50 000 then tax = house * 0.01

else if house > 100 000 then tax = house * 0.015

else if house > 200 000 then tax = house * 0.02

else tax = 0

endif

endif

endif

print tax

count = count + 1

endwhile

 

Posted Date: 9/11/2013 3:55:21 AM | Location : United States







Related Discussions:- Write an algorithm of value in tax using pseudocode, Assignment Help, Ask Question on Write an algorithm of value in tax using pseudocode, Get Answer, Expert's Help, Write an algorithm of value in tax using pseudocode Discussions

Write discussion on Write an algorithm of value in tax using pseudocode
Your posts are moderated
Related Questions
Simulation is the process of making an abstract model of a real world situation in order to be aware of the effect of modifications and alterations and the effect of introducing nu

Advantages of dry running a flowchart When dry running a flowchart it's advisable to draw up a trace table illustrating how variables change their values at every stage in the

Since memory is becoming more & cheaper, the prominence of runtime complexity is enhancing. However, it is very much significant to analyses the amount of memory utilized by a prog

I need a person who has a good background in using R. Studio? In adition, a person who is good in using algorithms.

Determine the stereo vision There is still one more major item missing, before we can look at a computer display or plot and perceive it just as we see a real object, namely th

In order to get the contents of a Binary search tree in ascending order, one has to traverse it in In-order

What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra

A full binary tree with 2n+1 nodes have n non-leaf nodes

Q. Explain quick sort? Sort the given array using quick sort method. 24 56 47 35 10 90 82 31

CMY Model  The cyan, magenta, yellow (CMY) colour model is a subtractive model based on the colour absorption properties of paints and inks. As such it has become the standard