Final answer:
To calculate net pay by subtracting tax from gross pay, use the statement 'net_pay = gross_pay - tax;' in the appropriate programming language.
Step-by-step explanation:
To subtract tax from gross_pay and assign the result to net_pay, a simple arithmetic operation is performed in most programming languages. Here is how you can write this statement (assuming the programming language allows for this kind of direct arithmetic operation):
net_pay = gross_pay - tax;
This line of code calculates the after-tax income by subtracting the value of tax from gross_pay and stores the result in the variable net_pay.