202k views
3 votes
Is the following assignment statement valid or invalid? If it is invalid, why?

72 = amount

1 Answer

3 votes
The statement is invalid. In most programming languages, the variable or identifier (like `amount` in this case) should be on the left side of the assignment operator, not a literal value like 72. The correct form would be `amount = 72`.
User Igor Cova
by
8.1k points