1000 / 500 is an rvalue.
Simply put, an rvalue is a temporary value that doesn’t have a name that you can refer to later.
paintneeded is an lvalue, and this is what you should be assigning to:
paintneeded = 1000 / 500;
Although I suspect it would involve the area in the formula too 🙂
1
solved When I attempt to build this program I get this error: lvalue required as left operand of assignment [closed]