Winner: Chilemagic, a massive 21 bytes!
You may continue to submit your answer, however you can no longer win. Original post kept:
Your goal is to find all numbers in a string, and multiply each one individually by a value input by the user
- You will not need to worry about decimals
- The user will input a number and a string
- The user must type the number and string at some point, however the method the program reads it does not matter. It can be with stdin, reading a text file, etc, however the user must press the 9 button on their keyboard (for example) at some point
- Anything that can compile and run is acceptable
Example:
Sentence input: This 1 is22a 3352sentence 50
Number input: 3
Output: This 3 is66a 10056sentence 150
- This contest ends on September 6th, 2014 (7 days from posting).
- This is a code-golf, so the shortest code wins