answersLogoWhite

0


Best Answer
  1. You want to read the different ages of a group of people until an age of zero is entered. Based on the ages entered, you should count and print how many of the people are old (above 60), how many are middle-aged (from 30 to 60 (inclusive)), and how many are young (below 30). You should then print the category (old, middle-aged, young) that are the most in the group (You may assume that you get a different count for each category
User Avatar

Rawan Sarandah

Lvl 2
2y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Use variables: MonthlySalary, type real

OneMonthNetPayableAmount, type real

TwoYearsTotalSalary, type real

WelfareFund, type real

TotalWelfareFund, type real

TaxDeduction, type real

TotalTax, type real

DISPLAY "Please Enter the Monthly Salary"

ACCEPT MonthlySalary

WelfareFund = 0

TotalWelfareFund = 0

TaxDeduction = 0

TotalTax = 0

TwoYearsTotalSalary = 0

FOR (n = 1, n <= 24, n + 1)

If(MonthlySalary <= 10000) {

WelfareFund = MonthlySalary * 0.04

OneMonthNetPayableAmount = MonthlySalary - WelfareFund

}

Else If(MonthlySalary > 10000 And MonthlySalary < 20000) {

TaxDeduction = MonthlySalary * 0.03

OneMonthNetPayableAmount = MonthlySalary - TaxDeduction

WelfareFund = OneMonthNetPayableAmount * 0.06

OneMonthNetPayableAmount = OneMonthNetPayableAmount - WelfareFund

}

Else {

TaxDeduction = MonthlySalary * 0.05

OneMonthNetPayableAmount = MonthlySalary - TaxDeduction

WelfareFund = OneMonthNetPayableAmount * 0.08

OneMonthNetPayableAmount = OneMonthNetPayableAmount - WelfareFund

}

TwoYearsTotalSalary = TwoYearsTotalSalary + OneMonthNetPayableAmount

TotalWelfareFund = TotalWelfareFund + WelfareFund

TotalTax = TotalTax + TaxDeduction

ENDFOR

DISPLAY "One Month Net Payable Amount ",OneMonthNetPayableAmount

DISPLAY "Two Years Total Salary ",TwoYearsTotalSalary

DISPLAY "Two Years Total Welfare Fund ",TotalWelfareFund

DISPLAY "Two Years Total Tax",TotalTax

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an algorithm in pseudo code form for the following problem and also draw a Flow chart for the same problem statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is pseudo code algorithm for create a linked list with a header and insert a four numbers to the list?

pseudo code algorithm to create a linked list


What are the ways representing an algorithm?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What is the difference between implementation and algorithm?

An algorithm is a instruction for solving a problem. It is typically illustrated using prose, pseudo code or flowcharts, but other methods exist. The algorithm is the "here's how it's going to work" part of the solution. An implementation (of an algorithm) is a specific expression of this algorithm, using a specific programming language or any other suitable means. The implementation is the "here's how I've done it" part of the solution.


What is pseudo authenticity?

The most contradictory statement in discourse.


How do you change algorithm to program code?

Ah yes, the eternal question on structured design and top-down coding.First, you need to understand the algorithm you intend to use. Write down English-like statements that describe the steps., etc., to arrive at a solution. If you can't describe what you want to do then chances are you don't understand the algorithm.Then, translate the English-like statement/paragraph into something called pseudo-code. Pseudo-code is a mixture of the English-like statement you provided and close to the grammar of the computer language you are translating to.Then, step by step, change the individual steps from your pseudo-code example into the exact grammar of the computer language you are using. Finally, take all of the variables you have declared along the way and define them.Voila! You now have the corresponding computer program that represents the algorithm you described earlier.

Related questions

What is difference between alogrithm and pseudo code?

An algorithm is an abstract set of rules used to solve a specific problem. Pseudocode is just one of many ways to represent an algorithm.


What is pseudo code algorithm for create a linked list with a header and insert a four numbers to the list?

pseudo code algorithm to create a linked list


What are the ways representing an algorithm?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What is the difference between implementation and algorithm?

An algorithm is a instruction for solving a problem. It is typically illustrated using prose, pseudo code or flowcharts, but other methods exist. The algorithm is the "here's how it's going to work" part of the solution. An implementation (of an algorithm) is a specific expression of this algorithm, using a specific programming language or any other suitable means. The implementation is the "here's how I've done it" part of the solution.


How can i write pseudo code for C plus plus if i haven't even wrote the program yet?

You are going about this backwards. First, define the program. Second, describe its algorithm. Third, if needed, write pseudo code. (Sometime, algorithm and pseudo code is the same process.) Fourth, or third, write real code.


What is pseudo authenticity?

The most contradictory statement in discourse.


How do you change algorithm to program code?

Ah yes, the eternal question on structured design and top-down coding.First, you need to understand the algorithm you intend to use. Write down English-like statements that describe the steps., etc., to arrive at a solution. If you can't describe what you want to do then chances are you don't understand the algorithm.Then, translate the English-like statement/paragraph into something called pseudo-code. Pseudo-code is a mixture of the English-like statement you provided and close to the grammar of the computer language you are translating to.Then, step by step, change the individual steps from your pseudo-code example into the exact grammar of the computer language you are using. Finally, take all of the variables you have declared along the way and define them.Voila! You now have the corresponding computer program that represents the algorithm you described earlier.


In pseudo-code the if-then statement is an example of?

B. Decision StructureTony Gaddis


How do you make pseudo code algorithm and flowchart that will count the number of occurrences of each letter in an input word?

Ugh. Forget this... It's impossible...


Who among the following talks of pseudo pressure groups?

duverger


What is the difference of source code object code and pseudo code?

Source code is a sequence of executable instructions written in a particular language. Pseudo code is a sequence of non-executable instructions. It is also called algorithm written in plain English


What is the difference between Pseudo instructions and instruction?

A pseudo-instruction : A symbolic representation in a compiler or interpreter. An instruction : a simple statement in any language that defines a task or computation etc.