dropOdds::Int->IntdropOddsx|x>=10=10*dropOddsrestDigits+filterDropsfirstDigit|otherwise=filterDropsxwherefirstDigit=x`mod`10restDigits=x`div`10filterDropsx|x`mod`2==0=x-- x is even => we keep it|otherwise=0-- x is drop => we main=doprint(dropOdds0)print(dropOdds8)print(dropOdds10)print(dropOdds1357)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
even I want this answer !!
With Recursion :