|
My function received a string such as 789-456-1101 how to filter out "-"
Becomes 789,456,101
The book above is stored in a string
Then I got this book how to multiply each 2 and then add up
Such as 7 * 2 + 8 * 2 + 9 * 2 + 4 * 2 + 5 * 2 + 6 * 2 + 1 * 2 + 1 * 2 + 0 * 2 + 1 * 2
Thank you! By the way, is this a string or a character array?
And don't just talk about what to do, write a short code for reference! |
|