
-----------------------------------
Ducky
Tue Mar 05, 2019 4:08 pm

Having a hard time with the syntax here, &quot;syntax error at tax, rateofPay and taxRate&quot;
-----------------------------------
var name : string;
var hoursWorked : real; 
var rateofPay : real;
var netPay : real;
var taxRate : real;
var totalPay : real;
var netpay : real;
var tax : real;
tax := 28%
var grossPay : real;

put "Please enter your name:"
get name;
put "Please enter the hours you have worked"
get hoursWorked;
put "How much money do you earn?" 
get rateofPay;
put"What is tax rate?" 
get taxRate;

hoursWorked*rateofPay=grossPay;
grossPay*taxRate=tax;
grossPay-tax=totalPay;

-----------------------------------
Insectoid
Wed Mar 06, 2019 11:44 am

RE:Having a hard time with the syntax here, &quot;syntax error at tax, rateofPay and taxRate&quot;
-----------------------------------
Your last 3 lines are completely wrong. The variable being assigned to goes first, followed by the assignment operator which is :=, not =. Finally, nowhere in your code is a semicolon necessary.
