Hello guys,
There is a problem about java i need to solve. The user provides a string which has numbers in it. One of the numbers is missing. The first and the last number can be between -9999 and 9999 and the difference can be between -99 and 99. My program should print the missing number.
Here are some examples:
510152030
25
567566565564563562561560559557556555554
558
828588919497100103106112115118121
109
-45-35-25-55152535455565
-15
I only have a basic knowledge in java.( while,for,if)
I don't want to use break,continue,switch
I would appreciate your help...
What I have tried:
I could not try anything because my code gets too long.