Problem

If the amount variable contains the string “$56.55”, which of the following statements w...

If the amount variable contains the string “$56.55”, which of the following statements will remove the dollar sign from the variable’s contents?

a. amount.erase("$");

b. amount.erase(0, 1);

c. amount = amount.substr(1);

d. both b and c

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search