Array, for, while or if ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Array, for, while or if ?

if I input a data including number and char (data type) and I don't know how many it is, how can I find the latest "char" in it, and find two closest number that are at latest "char" right ,and do this work again and again? like this EX: add 2 3 sub 2 3 4 add 1 4 3...... if second "add" is last "char" I will find it, and find two closest number "1" & "4" ,then next last char is "sub" so I find it ... and do this work again until final

10th Nov 2016, 2:03 PM
Eric Lai
Eric Lai - avatar
1 Answer
0
check for "regular expressions" i think it can help you solving the problem
12th Nov 2016, 11:01 AM
Walid Boudebouda
Walid Boudebouda - avatar