188k views
5 votes
Write a pseudocode statement thatsubtracts the vaiable downPayment from the variable total andassigns the reult to the variable due.

1 Answer

3 votes

Answer:

initialize the variables total and downPayment.

int due = total - downPayment;

Step-by-step explanation:

In the programming, before use the variable in the code you have to declare the variable.

then, there are the mathematical operators in the programming to perform the mathematical calculation.

for perform addition, the operator is '+'.

for performing multiplication, the operator is '*'.

similarly, for performing subtraction, the operator is '-'.

and there is one more assignment operator in programming which is used to assign the value to the variables. The assignment operator is '='.

so, int due = total - downPayment;

in the above, the program subtracts the downPayment value from the total value and assign to the variable due which is an integer type.

User TriumphST
by
5.5k points