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
A binary tree of depth "d" is an almost complete binary tree if  A) Every leaf in the tree is either at level "d" or at level "d-1"  B)  For any node "n" in the tree with a

1. Apply the variant Breadth-First Search algorithm as shown in Figure 2 to the attached graph. This variant is used for computing the shortest distance to each vertex from the sta

Count Scorecards(30 points) In a tournament, N players play against each other exactly once. Each game results in either of the player winning. There are no ties. You have given a

include int choice, stack[10], top, element; void menu(); void push(); void pop(); void showelements(); void main() { choice=element=1; top=0; menu()

What is A Container Taxonomy It's useful to place containers in a taxonomy to help understand their relationships to one another and as a basis for implementation using a class

B-trees are special m-ary balanced trees utilized in databases since their structure allows records to be added, deleted & retrieved with guaranteed worst case performance. A B-

Area Subdivision Method In this method, the viewport is examined for clear decisions on the polygons situated in it, in regard to their overlap and visibility to the viewer. Fo

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

What is wrong with the following algorithm for sorting a deck of cards (considering the basic properties of algorithms)? I. Put the cards together into a pile II. For each ca

floyd warshall algorithm