Problem 28. Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99.
Example:
Input a = {'$12,001.87','$0.04','$12,003,887.55','$0.32'}; Output b is 12015889.78
Solution Stats
Problem Comments
-
3 Comments
Alan Mackay
on 6 Jul 2012
The test to see if this is correct doesn't work. If you just code 'b = 0' then it is always correct!
Ajay Pattassery
on 15 Mar 2019
This is really cool problem.
Md. Ikrama Hossain
on 17 Apr 2023
?
Solution Comments
Show commentsProblem Recent Solvers3663
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15530 Solvers
-
433 Solvers
-
Find perfect placement of non-rotating dominoes (easier)
350 Solvers
-
Sum of first n terms of a harmonic progression
419 Solvers
-
Magic is simple (for beginners)
9195 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!