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
Deletion Algorithm for dequeue Step 1: [check for underflow]   If front = 0 and rear = 0   Output "underflow" and return Step 2: [delete element at front end]   If front

Diffuse Illumination Diffuse illumination means light that comes from all directions not from one particular source. Think about the light of a grey cloudy day as compared to

Illustrate an example of algorithm Consider that an algorithm is a sequence of steps, not a program. You might use the same algorithm in different programs, or express same alg

Comparison of Gouraud and Phong Shading Phong shading requires more calculations, but produces better results for specular reflection than Gouraud shading in the form of more r


Type of Qualitative Method: Different  qualitative methods are suitable for different  types of study. Quite often we can  combine  qualitative and quantitative  methods. Many

#question.show that the following inequality is correct or incorrect. n!=O(n^n)

how to define the size of array

Five popular hashing functions are as follows: 1) Division Method 2) Midsquare Method 3) Folding Method 4) Multiplicative method 5) Digit Analysis