-1

Hello duniaweb i am new computer user so i have not much information about the computer
i need the help for my assignment of CS
plzzzzzzz help me.......

Write an algorithm in pseudo code form for the following problem and also draw a Flow chart for the same problem statement.

There is a multinational company. In the company, there are deductions from the salary of the employee according to following rules:
i) If salary is less than 10,000 then no tax deduction and 4% of salary will be deducted as Well-fare fund every month.
ii) If salary is more than 10,000 and less than 20,000 then 3% of salary as tax deduction and 6% of remaining salary as employee well-fare fund will be deducted every month.

iii) If salary is equal to or more than 20,000 then 5 % of the salary as tax deduction and 8% of remaining salary as employee well-fare fund will be deducted every month .

Take salary input from user and after appropriate deduction show the net payable amount for month.
Using Loop structure calculate the total salary; paid tax and well fare fund of that particular employee for two years and display these values at end.

4
Contributors
5
Replies
7
Views
7 Years
Discussion Span
Last Post by goshe17
0

This is a pencil and paper exercise at first. You have to look at it and think about how you would do the work if you were the computer. "Someone tells me they make 19,500, and I have to decide how much deduction, then do the rest of the problem too. You can start by thinking about the way the data flows through the system, or you can start by thinking about how the program would answer the question if you programmed it in pseudo-code (it will turn out to be the same answer no matter where you start).

Edited by griswolf: n/a

-1
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

Edited by mike_2000_17: Fixed formatting

0

I did not read it carefully, but I also did not see any obvious problems. In my opinion the specification is wrong (why loop when you can multiply?) but it is the spec...

In C, C++, Python, ... loops usually run from 0 up to but not including the limit for month = 0, month < 24, ++month . As a programmer, I have made myself use some habits until they are so easy anything else seems hard. One of them is that loops run over a half-open range: from start, up to but not including end. This has a lot of good consequences. I recommend it.

-1

Solution file attached!

Q: Write an algorithm in pseudo code form for the following problem and also draw a Flow chart for the same problem statement (5+5)

There is a multinational company. In the company, there are deductions from the salary of the employee according to following rules:
i) If salary is less than 10,000 then no tax deduction and 4% of salary will be deducted as Well-fare fund every month.
ii) If salary is more than 10,000 and less than 20,000 then 3% of salary as tax deduction and 6% of remaining salary as employee well-fare fund will be deducted every month.

iii) If salary is equal to or more than 20,000 then 5 % of the salary as tax deduction and 8% of remaining salary as employee well-fare fund will be deducted every month .

Take salary input from user and after appropriate deduction show the net payable amount for month.
Using Loop structure calculate the total salary; paid tax and well fare fund of that particular employee for two years and display these values at end.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.