Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you help by doing a flow chart of this answer? function calculate Salary(): var n; var hours[n]; var payrate[n]; var DEDUCT_PERC = 0.20; var

can you help by doing a flow chart of this answer? image text in transcribed
function calculate Salary(): var n; var hours[n]; var payrate[n]; var DEDUCT_PERC = 0.20; var REG_HRS = 40; var OVER_WAGE = 1.5; var gsal[n]; var netsal[n]; var overpay[n]; print "Enter the number of employees: read n print "Enter the hours for each employee:" for i in range(0,n): read hours[i] print "Enter the payrate for each employee:" for i in range(0,n): read payrate[u for i in range(0,n): if(hours[i]>40): overpay[i] = (hours[i]- REG_HRS)*payrate[i] *OVER_WAGE gsal[i] = REG_HRS*payrate[i] + overpay[i] else: gsal[i] = hours[i]*payrate[i] for i in range(0,n): deduct[i] = gsal[i] * DEDUCT_PERC netsal[i] = gsal[i] - deduct[i] for i in range(0,n): print("Payslip for employee: "(i+1)) print("Amount for overtime: "overpay[i]) print("Gross pay: "gsali) print("Deduction:", deduct[i]) print("Net Pay:"netsal[i]) print(

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago