0
Can you kindly explain this?
https://code.sololearn.com/cbVyZnxD3evw/?ref=app input <= 45g65 output => 4565 input <= 45gjsb65 output => 450 input <= 45 output => 450 Suppose, I just want to remove any number of character inside a digit, where to make change? And why it puts 0 if I enter 45hvsg65 or 45, why not 4500?
7 odpowiedzi
+ 2
I don't think you can use scanf placeholder format argument to achieve more than skipping a fixed number of char before getting another number...
you rather have to get the whole line input as string and extract numbers from it by yourself ^^
+ 2
Lucifer Samael Morningstar
As visph said ,get input as string then scan the string ,check if any isalpha(c) there, if yes remove it or print only if isnum(c) is there
+ 1
Bro what's ur requirement,
Is it to remove all characters from the input, o/p should have only number????
Like
45gjsjs78>>>>4578
6hsh8vab0bsb233>>>680233
0
Hêłp☆mę!Č++🥺 Yes but what do you mean by o/p?
0
o/p means Output
0
yeah o/p should have only number
0
Hêłp☆mę!Č++🥺 okay got it thanks