Write a statement that uses an arithmetic assignment operator to subtract the value of variable ans by 17. Write the same statement without arithmetic assignment operator.

Q41. Write a statement that uses an arithmetic assignment operator to subtract the value of variable ans by 17. Write the same statement without arithmetic assignment operator.

Ans. Expression with arithmetic assignment operator:

ans – = 17;

Expression without arithmetic assignment operator:

ans = ans – 17;

Leave a Reply

Your email address will not be published. Required fields are marked *

59 Views
%d bloggers like this: