# Weekly Gross Pay Raptor Flowchart

Contents

### Problem

Calculate the weekly gross pay for an employee using a  Raptor Flowchart. Based on the below  information.

Overtime rule: If the employee works for more than 30 hrs/week, the company pays 20% extra on the all the hours worked overtime.

### Flowchart  ### Pseudocode

```START
//Declare variables used in the flowchart hoursWorked =0; ratePerHour =0; grossPay =0; overTime ="";
//Take input from the user PROMPT ="Enter weekly hours worked :="; INPUT hoursWorked PROMPT ="Enter rate per hour := \$"; INPUT ratePerHour;
//overtime logic calculations IF (hoursWorked>30) { overTime ="Yes"; grossPay =30*ratePerHour+(hoursWorked-30)*1.2*ratePerHour; // 20 % extra for overtime 1+ 20/100 = 1.2 } ELSE { overTime ="No"; grossPay =hoursWorked*ratePerHour; }
// Output PRINT ("Hours Worked :="+hoursWorked); PRINT ("Rate per hour := \$"+ratePerHour); PRINT ("OverTime ?="+overTime); PRINT ("Weekly gross pay := \$"+grossPay);
END```

### Output Hours Worked :=45
Rate per hour := \$10
OverTime ?=Yes
Weekly gross pay := \$480
—-Run complete. 16 symbols evaluated.—-