+ 3
Quiz time!!
Make a program which counts the number of numeric values in a string!!! Eg: input : i am born at 9th august 1996!! output: 5 // where 9 -first number 1- second number 9-third number 9-fourth number 6- fifth number so totally 5 numbers!! //
4 Respuestas
+ 6
+ 2
@burey
well that was easy to bite for you😂😂
I just created another quiz to make u chew this time😜😉
here is the link
https://www.sololearn.com/discuss/433726/?ref=app
+ 2
@Michal
you program is all good😉
and it s decimal actually😅
+ 1
did you mean 'decimal digits' ?
https://code.sololearn.com/wIQsjcz4I4XR/#php
<?php
$str = 'i am born at 9th august 1996!!';
$cnt = 0;
for($idx = 0; $idx < strlen($str); $idx++)
if (is_numeric($str[$idx])) $cnt++;
echo $cnt;
?>