+ 2

Count numbers in a string

Hello friends, help me in providing code. given a string as input. eg "abc13sagg562fsa4g" is a input string. output must be the count of numbers present in the string ie., the output for above string is 3 (as numbers present in input string are 13, 562, 4). few more examples: Input 1: sde67sddsh5ghgg563sf5dj23 output: 5 input 2: s5f42ds2gs25 output: 4

7th Jul 2017, 7:45 AM
Sridhar
Sridhar - avatar
7 Respostas
+ 2
Here's the solution in ruby https://code.sololearn.com/c939w1KE0NyQ
7th Jul 2017, 8:46 AM
Salekin
Salekin - avatar
+ 2
What language?
7th Jul 2017, 8:03 AM
aklex
aklex - avatar
+ 2
any lang preferably C, Python, Java
7th Jul 2017, 8:19 AM
Sridhar
Sridhar - avatar
+ 2
any one help me providing Java code . pls..
7th Jul 2017, 8:50 AM
Sridhar
Sridhar - avatar
+ 1
good code
13th Jul 2017, 4:31 PM
tarun
tarun - avatar
0
thank you @salekin
7th Jul 2017, 8:49 AM
Sridhar
Sridhar - avatar
7th Jul 2017, 1:34 PM
Igor B
Igor B - avatar