+ 1
How to cut last numeral in string?( C# or C++)
I should take last numeral Example : "12*8+4" ---- "4" "475/8-89" ---- "89" "34+6-8×42" --- "42" "71×5-800/100" --- "100" Please help me
6 Respuestas
+ 3
From iterating reversal through string in loop, if character is not a number then stop loop and save index value. Now just copy original string up to the founded index value.. There may be other ways you can try..
+ 3
You're using extended ASCII character '×' as multiplication operator represeentation. During an attempt I found that it may add to the challenge more difficulty of finding last position of that character in a string (in C# code)
+ 2
Thanks a lot
+ 2
Azimjon Abdug'afforov
How is it going?
Have you solved this yet?
+ 1
idk about C, but in python i would probably use a while loop and index slicing. like this...
https://code.sololearn.com/cr2sWrN3nAHp/?ref=app
0
listen to Jayakrishna, i just did it but he explained it well.